<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[blog.cdemi.io]]></title><description><![CDATA[I am a software and infrastructure enthusiast and this is what I think about stuff]]></description><link>https://blog.cdemi.io/</link><image><url>https://blog.cdemi.io/favicon.png</url><title>blog.cdemi.io</title><link>https://blog.cdemi.io/</link></image><generator>Ghost 4.48</generator><lastBuildDate>Wed, 22 Apr 2026 13:27:07 GMT</lastBuildDate><atom:link href="https://blog.cdemi.io/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Statistics on kelma.mt]]></title><description><![CDATA[A few weeks ago I decided to start collecting some statistics on kelma.mt. Turns out most people like to play early in the morning and get it right in 3-4 guesses!]]></description><link>https://blog.cdemi.io/statistics-on-kelma-mt/</link><guid isPermaLink="false">6220e3695e576e00013d2026</guid><category><![CDATA[General]]></category><dc:creator><![CDATA[Christopher Demicoli]]></dc:creator><pubDate>Thu, 03 Mar 2022 20:59:15 GMT</pubDate><media:content url="https://blog.cdemi.io/content/images/2022/03/kelma.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.cdemi.io/content/images/2022/03/kelma.png" alt="Statistics on kelma.mt"><p>A few weeks ago I decided to start collecting some statistics on <a href="https://kelma.mt/">kelma.mt</a>. Google Analytics gave me some basic interaction statistics but I wanted to delve deeper into how people were playing the game.</p><p>On average, <strong>1,000 people play the game every day</strong>. Most answers come in between 7am and 9am and the second most between 7pm and 9pm. I was surprised to see that even during the early hours of the day 2am - 4am, activity does not stop. I guess people enjoy playing the game if they cannot sleep or maybe players who are working night shifts?</p><figure class="kg-card kg-image-card kg-width-wide"><img src="https://blog.cdemi.io/content/images/2022/03/Answers-over-time.png" class="kg-image" alt="Statistics on kelma.mt" loading="lazy" width="1579" height="758" srcset="https://blog.cdemi.io/content/images/size/w600/2022/03/Answers-over-time.png 600w, https://blog.cdemi.io/content/images/size/w1000/2022/03/Answers-over-time.png 1000w, https://blog.cdemi.io/content/images/2022/03/Answers-over-time.png 1579w" sizes="(min-width: 1200px) 1200px"></figure><p>The <strong>majority of the games are solved in either 4 or 3 guesses</strong> and 9% of the games ended without the correct guess.</p><figure class="kg-card kg-image-card"><img src="https://blog.cdemi.io/content/images/2022/03/Guesses.png" class="kg-image" alt="Statistics on kelma.mt" loading="lazy" width="771" height="710" srcset="https://blog.cdemi.io/content/images/size/w600/2022/03/Guesses.png 600w, https://blog.cdemi.io/content/images/2022/03/Guesses.png 771w" sizes="(min-width: 720px) 720px"></figure><p>Unsurprisingly, <strong>the most common starting word is KELMA</strong> (8%) with WERQA (3%) and MEJDA (3%) being the second most common.</p><figure class="kg-card kg-image-card kg-width-wide"><img src="https://blog.cdemi.io/content/images/2022/03/starting-words.png" class="kg-image" alt="Statistics on kelma.mt" loading="lazy" width="893" height="427" srcset="https://blog.cdemi.io/content/images/size/w600/2022/03/starting-words.png 600w, https://blog.cdemi.io/content/images/2022/03/starting-words.png 893w"></figure><p>I also decided to gather some statistics on what words people type that are not in the dictionary. The top offenders are HASEL, &#x126;AWEL, XELTI, GMIEL and &#x17B;MER&#x10A;.</p><p>The first few are obviously spelling mistakes, however I did find some words which were not in my dictionary; such as: PASTA, BINTI, &#x120;OBNA, MONTI, &#x120;A&#x126;AN, &#x10A;ERTU and &#x10A;OMBA. The dictionary source I am using is <a href="https://mlrs.research.um.edu.mt/resources/gabra/">&#x120;abra from the University of Malta</a>. After I gather some more and filter out the spelling mistakes I intend to submit these to the dictionary. I may even be wrong and some of these words might not even be valid in Maltese, we&apos;ll see.</p><figure class="kg-card kg-image-card kg-width-wide"><img src="https://blog.cdemi.io/content/images/2022/03/not-in-dictionary.png" class="kg-image" alt="Statistics on kelma.mt" loading="lazy" width="988" height="405" srcset="https://blog.cdemi.io/content/images/size/w600/2022/03/not-in-dictionary.png 600w, https://blog.cdemi.io/content/images/2022/03/not-in-dictionary.png 988w"></figure><p>From the demographics side of things, during the last 28 days, US, UK, Italy and Belgium ranked the highest visits after Malta.</p><figure class="kg-card kg-image-card kg-width-wide"><img src="https://blog.cdemi.io/content/images/2022/03/countries.png" class="kg-image" alt="Statistics on kelma.mt" loading="lazy" width="2000" height="1103" srcset="https://blog.cdemi.io/content/images/size/w600/2022/03/countries.png 600w, https://blog.cdemi.io/content/images/size/w1000/2022/03/countries.png 1000w, https://blog.cdemi.io/content/images/size/w1600/2022/03/countries.png 1600w, https://blog.cdemi.io/content/images/2022/03/countries.png 2037w" sizes="(min-width: 1200px) 1200px"></figure><p>OS and browser-wise, Android and Chrome win the race, with a staggering 80% of usage coming from mobile devices:</p><figure class="kg-card kg-image-card kg-width-wide"><img src="https://blog.cdemi.io/content/images/2022/03/OS.png" class="kg-image" alt="Statistics on kelma.mt" loading="lazy" width="932" height="390" srcset="https://blog.cdemi.io/content/images/size/w600/2022/03/OS.png 600w, https://blog.cdemi.io/content/images/2022/03/OS.png 932w"></figure><figure class="kg-card kg-image-card"><img src="https://blog.cdemi.io/content/images/2022/03/Device-Type.png" class="kg-image" alt="Statistics on kelma.mt" loading="lazy" width="407" height="490"></figure><p>One last interesting fact that I noticed is that people prefer to play using the web browser rather than the app. Only 163 devices have <a href="https://play.google.com/store/apps/details?id=mt.kelma.twa">the kelma.mt app installed on Google Play Store</a>. In reality, the app in the Play Store is just a PWA wrapper around the app so I can see why there would be no need to download the app.</p><p>Anyways, I am really glad people are enjoying <a href="https://kelma.mt/">kelma.mt</a>. </p>]]></content:encoded></item><item><title><![CDATA[Visualizing AS32934 (Facebook) BGP Outage]]></title><description><![CDATA[A lot has already been said about the 6-hour Facebook outage of 4th October 2021. Instead, I will take a different approach; visualizing it.]]></description><link>https://blog.cdemi.io/visualizing-as32934-facebook-bgp-outage/</link><guid isPermaLink="false">615cbaca84c5720001e86c1d</guid><category><![CDATA[Data Center]]></category><category><![CDATA[Exterior Gateway Protocols]]></category><category><![CDATA[Infrastructure]]></category><category><![CDATA[IP]]></category><category><![CDATA[Networking]]></category><category><![CDATA[Routing Protocols]]></category><dc:creator><![CDATA[Christopher Demicoli]]></dc:creator><pubDate>Tue, 05 Oct 2021 21:16:17 GMT</pubDate><media:content url="https://blog.cdemi.io/content/images/2021/10/fb-outage-cover-min.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://blog.cdemi.io/content/images/2021/10/fb-outage-cover-min.jpg" alt="Visualizing AS32934 (Facebook) BGP Outage"><p><a href="https://edition.cnn.com/2021/10/04/tech/facebook-instagram-whatsapp-outage/index.html">A</a> <a href="https://www.independent.co.uk/life-style/gadgets-and-tech/facebook-instagram-down-whatsapp-latest-b1932071.html">lot</a> <a href="https://www.theverge.com/2021/10/4/22708989/instagram-facebook-outage-messenger-whatsapp-error">has</a> <a href="https://engineering.fb.com/2021/10/04/networking-traffic/outage/">already</a> <a href="https://timesofmalta.com/articles/view/whatsapp-instagram-facebook-down-in-major-outage.905494">been</a> <a href="https://www.bbc.com/news/technology-58800726">said</a> <a href="https://news.sky.com/story/facebook-outage-what-actually-caused-whatsapp-and-instagram-to-go-down-12426383">about</a> the 6-hour Facebook, WhatsApp, Instagram, et al... outage of 4th October 2021. Instead, I will take a different approach; visualizing it.</p><p><a href="https://www.reddit.com/r/sysadmin/comments/q181fv/looks_like_facebook_is_down/">As keen-eyed network engineers had already deduced</a>, Facebook&apos;s AS32934 withdrew all BGP routes at around 5PM UTC on 4/10/2021. I had already done <a href="https://blog.cdemi.io/beginners-guide-to-understanding-bgp/">a blog post in the past with a layman&apos;s summary of what BGP is</a>. In short, BGP is, quite literally, the protocol that makes the internet work. BGP is used to announce routes of how one network can reach another network over the internet.</p><h3 id="1642-utc-as32934-route-withdraw">16:42 UTC: AS32934 Route Withdraw</h3><p>Using <a href="https://stat.ripe.net/widget/bgplay#w.resource=AS32934">RIPE&apos;s BGPlay</a>, we can see AS32934 withdrawing its routes and essentially leaving the no path for IP packets to reach the Facebook network. All of this happens in about 10 minutes, after which the internet has fully converged on the new route announcements and no viable path to Facebook&apos;s network was available.</p><!--kg-card-begin: html--><video src="https://blog.cdemi.io/content/images/2021/10/AS32934_Route_Withdraw-h264.mp4" controls preload style="width:100%"> </video><!--kg-card-end: html--><h3 id="2300-utc-as32934-announcing-routes">23:00 UTC: AS32934 Announcing Routes</h3><p>After about 6 hours of downtime, Facebook&apos;s border routers started announcing AS32934 again and we can again visualize the internet converging. Internet routers started adding these routes to their routing tables so IP transit towards Facebook was possible again.</p><!--kg-card-begin: html--><video src="https://blog.cdemi.io/content/images/2021/10/AS32934_Route_Announce-h264.mp4" controls preload style="width:100%"> </video><!--kg-card-end: html--><p>For more details about the October 4 outage, <a href="https://engineering.fb.com/2021/10/05/networking-traffic/outage-details/">Facebook has published a blog post</a> with some technical challenges they had during the outage and how they overcome them.</p><p>In any case, it&apos;s also a big relief that big companies can also have 6-hour outages :) At least, this time, it was not our fault!</p>]]></content:encoded></item><item><title><![CDATA[Maximizing the chances of finding "the right one" by solving The Secretary Problem]]></title><description><![CDATA[When it comes to love, making long-term decisions is a risky business. How do we know when we've truly found “The One”? Should we settle for the current one? Or is there a better match?]]></description><link>https://blog.cdemi.io/maximizing-the-chances-of-finding-the-right-one-by-solving-the-secretary-problem/</link><guid isPermaLink="false">5e5f89a0f108e60001404e3d</guid><category><![CDATA[Optimal Strategies]]></category><category><![CDATA[Math]]></category><category><![CDATA[Algortihms]]></category><category><![CDATA[Humor]]></category><dc:creator><![CDATA[Christopher Demicoli]]></dc:creator><pubDate>Wed, 03 Apr 2019 09:46:14 GMT</pubDate><media:content url="https://blog.cdemi.io/content/images/2019/04/secretary-problem2-min.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.cdemi.io/content/images/2019/04/secretary-problem2-min.png" alt="Maximizing the chances of finding &quot;the right one&quot; by solving The Secretary Problem"><p>Finding the right partner from 3,812,261,000 females (or 7,692,335,072 humans, if you&apos;re bisexual) is difficult. You never really know how one partner would compare to all the other people you might meet in the future. Settle down early, and you might forgo the chance of a more perfect match later on. Wait too long to commit, and all the good ones might be gone. You don&apos;t want to marry the first person you meet, but you also don&apos;t want to wait too long because you&apos;ll run the risk of missing your ideal partner and being forced to make do with whoever is available at the end. It&apos;s a tricky one. </p><p>This is what&apos;s called &quot;the <strong>optimal stopping problem</strong>&quot;. It is also known as &quot;the <strong>secretary problem</strong>&quot;, &quot;the <strong>marriage problem</strong>&quot;, &quot;the <strong>sultan&apos;s dowry problem</strong>&quot;, &quot;the <strong>fussy suitor problem</strong>&quot;, &quot;the <strong>googol game</strong>&quot;, and &quot;the <strong>best choice problem</strong>&quot;. The problem has been studied extensively in the fields of applied probability, statistics, and decision theory. </p><p>The problem is as follows:</p><!--kg-card-begin: markdown--><blockquote>
<p>&quot;Imagine an administrator who wants to hire the best secretary out of <code>n</code> rankable applicants for a position. The applicants are interviewed one by one in random order. A decision about each particular applicant is to be made immediately after the interview. Once rejected, an applicant cannot be recalled. During the interview, the administrator gains information sufficient to rank the applicant among all applicants interviewed so far, but is unaware of the quality of yet unseen applicants.&quot; - <em>The Secretary Problem</em></p>
</blockquote>
<!--kg-card-end: markdown--><p>At the core of the secretary problem lies the same problem as when dating, apartment hunting (or selling) or many other real life scenarios; what is the optimal stopping strategy to maximize the probability of selecting the best applicant? Well, <strong>in reality, the problem is not about choosing secretaries</strong> or finding the ideal partner, <strong>but about decision making under uncertainty</strong>.</p><p>The solution to this problem turns out to be quite elegant. Let&apos;s say you can rate each partner/secretary from 1-10 according to how good they are:</p><figure class="kg-card kg-image-card kg-width-wide"><img src="https://blog.cdemi.io/content/images/2019/04/girls-min.png" class="kg-image" alt="Maximizing the chances of finding &quot;the right one&quot; by solving The Secretary Problem" loading="lazy"></figure><p>Had we known the full information beforehand, the problem would be trivial; choose either Alissa or Lucy. Unfortunately, <strong>we cannot look-ahead</strong> and <strong>there&apos;s no going back</strong>. When you&apos;re evaluating one partner, you are unable to look forward into the future and consider other opportunities. Similarly, if you date a great girl for a while, but leave her in a misguided attempt to find a better one and you fail, there&apos;s a good chance she&apos;ll be unavailable in the future. </p><h2 id="so-how-do-you-find-the-best-one">So, how do you find the best one?</h2><p>Well, you have to gamble. Like in casino games, there&apos;s a strong element of chance but the Secretary Problem helps us improve the probability of getting the best partner.</p><figure class="kg-card kg-image-card kg-width-wide"><img src="https://blog.cdemi.io/content/images/2019/04/pbox.gif" class="kg-image" alt="Maximizing the chances of finding &quot;the right one&quot; by solving The Secretary Problem" loading="lazy"></figure><p><strong>The magic figure turns out to be 37% </strong>(1/<em>e</em>=0.368). If you want to delve into the details of how this is achieved, I suggest you to read <a href="https://projecteuclid.org/download/pdf_1/euclid.ss/1177012493">the paper by Thomas S. Ferguson named &quot;Who Solved the Secretary Problem&quot;</a>. The solution to the problem states that to increase the probability of finding the best partner, <strong>you should date and reject the first 37% of your total group of admirers</strong>. Then you follow this simple rule: <strong>You pick the next best person who is better than anyone you&apos;re ever dated before</strong>. </p><p>So if we take the example above, we have 10 lovers. If we chose 1 at random, we have approximately a 10% chance of finding &quot;the right one&quot;. But if we use the method above, the probability of picking the best of the bunch increases significantly, to 37% - much better than random!</p><p>In our case, we end up with Lucy <u><em>(9)</em></u>. Yes she&apos;s not an Alissa <em>(10)</em>, but we didn&apos;t do badly.</p><p>Unfortunately, this method is not a 100% successful, as mathematician Hannah Fry discusses in this entertaining 2014 TED talk:</p><!--kg-card-begin: html--><div style="max-width:854px"><div style="position:relative;height:0;padding-bottom:56.25%"><iframe src="https://embed.ted.com/talks/lang/en/hannah_fry_the_mathematics_of_love" width="854" height="480" style="position:absolute;left:0;top:0;width:100%;height:100%" frameborder="0" scrolling="no" allowfullscreen></iframe></div></div>
<div style="height: 90px;"></div><!--kg-card-end: html--><h2 id="variations-of-the-problem">Variations of the Problem</h2><p>In the Secretary Problem, the goal was to get the very best partner possible. Realistically, getting someone that is slightly below the best option will leave you only slightly less happy. You could still be quite happy with the second (or third-best) option, and you&apos;d also have a lower chance of ending up alone. Matt Parker argues this in <a href="https://books.google.com.mt/books?id=wK2MAwAAQBAJ&amp;dq=Things+to+Make+and+Do+in+the+Fourth+Dimension:+A+Mathematician%27s+Journey+Through+Narcissistic+Numbers,+Optimal+Dating+Algorithms,+at+Least+Two+Kinds+of+Infinity,+and+More&amp;hl=en&amp;sa=X&amp;ved=0ahUKEwi3_rHGyLPhAhUSy6YKHSCPDGMQ6AEIKTAA">his book &quot;<em>Things to Make and Do in the Fourth Dimension: A Mathematician&apos;s Journey Through Narcissistic Numbers, Optimal Dating Algorithms, at Least Two Kinds of Infinity, and More</em>&quot;</a>. </p><p>In reality, many of the variations of the Secretary Problem are quite more accurate in solving specific problems.</p><h2 id="summary">Summary</h2><p>In laboratory experiments, people often stop searching too soon when solving optimal stopping problems.</p><p><strong>At the end of the day, the secretary problem is a mathematical abstraction and there is more to finding the &quot;right&quot; person than dating a certain number of people.</strong></p><!--kg-card-begin: markdown--><p>Although <strong>applying the Secretary Problem for finding true love should be taken with a pinch of salt</strong>, Optimal Stopping problems are real and can be found in areas of statistics, economics, and mathematical finance and you should take them seriously if you ever want to:</p>
<ul>
<li>Sell a House</li>
<li>Hire someone in a difficult position</li>
<li>Look for Parking</li>
<li>Trade Options</li>
<li>Gamble</li>
<li>Just know when to stop in general</li>
</ul>
<!--kg-card-end: markdown--><p>Real life is much more messy than we&apos;ve assumed. Sadly, not everybody is there for you to accept or reject, when you meet them, they might actually reject you! In real life people do sometimes go back to someone they have previously rejected, which our model doesn&apos;t allow. It&apos;s hard to compare people on the basis of a date, let alone estimate the total number of people available for you to date. And we haven&apos;t addressed the biggest problem of them all: that someone who appears great on a date doesn&apos;t necessarily make a good partner. Like all mathematical models our approach simplifies reality, but it does, perhaps, give you a general guideline; if you are mathematically inclined.</p><p>A great article <a href="https://www.jstor.org/stable/27859299?seq=1#page_scan_tab_contents">&quot;<em>Knowing When to Stop: How to gamble if you must&#x2014;the mathematics of optimal stopping</em>&quot; in American Scientist by Theodore P. Hill</a> goes into more details about this topic and is quite an interesting read.</p>]]></content:encoded></item><item><title><![CDATA[What's Coming in C# 8.0? Ranges and Indices]]></title><description><![CDATA[Ever wanted simple syntax for slicing out a part of an array, string or span? Now you can!
]]></description><link>https://blog.cdemi.io/whats-coming-in-c-8-0-ranges-and-indices/</link><guid isPermaLink="false">5e5f89a0f108e60001404e3b</guid><category><![CDATA[C#]]></category><category><![CDATA[C# 8.0]]></category><category><![CDATA[.NET]]></category><category><![CDATA[Software Development]]></category><dc:creator><![CDATA[Christopher Demicoli]]></dc:creator><pubDate>Thu, 06 Dec 2018 09:41:05 GMT</pubDate><media:content url="https://blog.cdemi.io/content/images/2018/12/C--2.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.cdemi.io/content/images/2018/12/C--2.png" alt="What&apos;s Coming in C# 8.0? Ranges and Indices"><p>Ever wanted simple syntax for slicing out a part of an array, string or span? Now you can!</p><p>Let&apos;s consider the following program:</p><!--kg-card-begin: markdown--><pre><code class="language-csharp">using System.Collections.Generic;
using static System.Console;

class Program
{
    static void Main(string[] args)
    {
        foreach (var name in GetNames())
        {
            WriteLine(name);
        }
    }

    static IEnumerable&lt;string&gt; GetNames()
    {
        string[] names =
        {
            &quot;Christopher&quot;, &quot;Natasha&quot;, &quot;Jean&quot;, &quot;Matthew&quot;, &quot;Luke&quot;
        };
        foreach (var name in names)
        {
            yield return name;
        }
    }
}
</code></pre>
<!--kg-card-end: markdown--><p>As you might expect, this program just prints the 5 names in the console.</p><h3 id="ranges-and-indices">Ranges and Indices</h3><!--kg-card-begin: markdown--><p>With new Ranges syntax, we can modify the <code>foreach</code> to iterate over names 1 to 4. For example:</p>
<pre><code class="language-csharp">foreach (var name in names[1..4])
</code></pre>
<p>The endpoint is exclusive (element 4 is not included). <code>1..4</code> is actually a <strong>range expression</strong>, and it doesn&apos;t have to occur like here, as part of an indexing operation. It has a type of its own, called <strong><code>Range</code></strong>. If we wanted, we could pull it out into its own variable, and it would work the same:</p>
<pre><code class="language-csharp">Range range = 1..4; 
foreach (var name in names[range])
</code></pre>
<p>The endpoints of a range expression don&apos;t have to be <code>int</code>s. In fact they&apos;re of a type, Index, that non-negative <code>int</code>s convert to. But you can also create an <code>Index</code> with a new <code>^</code> operator, meaning &quot;from end&quot;. So <code>^1</code> is one from the end:</p>
<pre><code class="language-csharp">foreach (var name in names[1..^1])
</code></pre>
<p>This lobs off an element at each end of the array, producing an array with the middle three elements, so the result would be:</p>
<pre><code>Natasha
Jean
Matthew
</code></pre>
<p>Range expressions can be open at either or both ends. <code>..^1</code> means the same as <code>0..^1</code>. <code>1..</code> means the same as <code>1..^0</code>. And <code>..</code> means the same as <code>0..^0</code>: beginning to end. Try them all out and see! Try mixing and matching &quot;from beginning&quot; and &quot;from end&quot; Indexes at either end of a Range and see what happens.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[A Weekly, Curated Newsletter]]></title><description><![CDATA[People today suffer from information overload, so I have decided to create a weekly newsletter, curated by me with the articles that (I think) are worthwhile.]]></description><link>https://blog.cdemi.io/a-weekly-curated-newsletter/</link><guid isPermaLink="false">5e5f89a0f108e60001404e3a</guid><category><![CDATA[General]]></category><dc:creator><![CDATA[Christopher Demicoli]]></dc:creator><pubDate>Wed, 07 Nov 2018 18:20:27 GMT</pubDate><media:content url="https://blog.cdemi.io/content/images/2018/11/Newsletter-min.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.cdemi.io/content/images/2018/11/Newsletter-min.png" alt="A Weekly, Curated Newsletter"><p>People today suffer from information overload; there&apos;s too much news and it&apos;s next to impossible to filter valuable news through the noise.</p><p>This is why I have decided to create a weekly newsletter, curated by me with news and articles that (I think) are worthwhile. Usual topics are: <strong>Software Development, Infrastructure, Databases, Security, DevOps, QA, UI/UX, eSports, iGaming, Space and more...</strong></p><p>The newsletter contains <strong>no ads</strong> and <strong>no tracking</strong> whatsoever and <strong>your email addresses will never be shared or sold to anyone</strong>. It&apos;s also easy to unsubscribe from if you feel it&apos;s spam.</p><p>The implementation is fairly simple and open-source. You can find it on <a href="https://github.com/cdemi/NewsletterCurator">GitHub cdemi/NewsletterCurator</a></p><p>Just to give you a general idea, one of the emails looks like this:</p><!--kg-card-begin: html--><video width="100%" autoplay loop muted playsinline preload="auto" poster="https://thumbs.gfycat.com/WeepyNegligibleFattaileddunnart-poster.jpg" tabindex="-1" style="width: 100%; margin: 0px auto; display: block;"><source src="https://giant.gfycat.com/WeepyNegligibleFattaileddunnart.webm" type="video/webm"><source src="https://giant.gfycat.com/WeepyNegligibleFattaileddunnart.mp4" type="video/mp4"><source src="https://thumbs.gfycat.com/WeepyNegligibleFattaileddunnart-mobile.mp4" type="video/mp4"></video><!--kg-card-end: html--><h2 id="subscribe">Subscribe</h2><p>To subscribe to the newsletter, you can fill out this form:</p><!--kg-card-begin: html--><iframe src="https://newslettercurator.cdemi.io/Newsletter/Subscribe" border="0" width="100%" style="border:none; width:100% height: 500px" height="500"></iframe><!--kg-card-end: html-->]]></content:encoded></item><item><title><![CDATA[Receiving Aircraft Surveillance Data and Contributing to FlightRadar24 and FlightAware]]></title><description><![CDATA[Modern aircraft are equipped with ADS-B; a surveillance technology in which an aircraft determines its position via GPS and periodically broadcasts it, enabling it to be tracked.]]></description><link>https://blog.cdemi.io/receiving-aircraft-surveillance-data-and-contributing-to-flightradar24-and-flightaware/</link><guid isPermaLink="false">5e5f89a0f108e60001404e39</guid><category><![CDATA[Amateur Radio]]></category><category><![CDATA[SDR]]></category><category><![CDATA[Aircraft]]></category><dc:creator><![CDATA[Christopher Demicoli]]></dc:creator><pubDate>Sun, 28 Oct 2018 23:33:00 GMT</pubDate><media:content url="https://blog.cdemi.io/content/images/2018/10/aircraft-min.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.cdemi.io/content/images/2018/10/aircraft-min.png" alt="Receiving Aircraft Surveillance Data and Contributing to FlightRadar24 and FlightAware"><p>Many modern aircraft are equipped with <a href="https://en.wikipedia.org/wiki/Automatic_dependent_surveillance_%E2%80%93_broadcast">ADS-B</a>; a surveillance technology in which an aircraft determines its position via <a href="https://en.wikipedia.org/wiki/Global_Positioning_System">GPS</a> and periodically broadcasts it, enabling it to be tracked.</p><h2 id="ads-b">ADS-B</h2><p><strong>ADS-B is much more accurate than conventional radar surveillance systems</strong>. This gives air traffic controllers the potential to reduce the required separation distance between aircraft that are ADS-B equipped. </p><p>ADS-B is seen as being vital to maintaining future efficient airspace management in busy airspace. It also provides advantages in remote &#x2018;non radar&#x2019; areas too &#x2013; here suitably equipped aircraft, with a traffic receiver connected to a display can see other aircraft without conventional radar coverage. This enhances aircraft visibility and reduces the risk of air to air collision.</p><p>ADS-B transmits separate messages<strong> every 500ms </strong>carrying <strong>10 bytes of data each</strong>. These contain <strong>GPS position</strong> (latitude, longitude), <strong>pressure</strong>, <strong>altitude</strong>, <strong>callsign</strong>, as well as <strong>track and ground speed</strong> over <strong>1090 MHz </strong>with <strong>about 50 kHz of bandwidth</strong>. ADS-B uses <a href="https://en.wikipedia.org/wiki/Pulse-position_modulation">pulse-position modulation</a> to transmit data.</p><figure class="kg-card kg-image-card"><img src="https://blog.cdemi.io/content/images/2018/10/chrome_2018-10-28_23-27-38-min.png" class="kg-image" alt="Receiving Aircraft Surveillance Data and Contributing to FlightRadar24 and FlightAware" loading="lazy"></figure><h3 id="what-does-it-look-and-sound-like">What does it look and sound like?</h3><p>If you were to visualize the 1090 MHz frequency during ADS-B broadcast it would look something like this</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blog.cdemi.io/content/images/2018/10/ADS-B-1--min.jpg" class="kg-image" alt="Receiving Aircraft Surveillance Data and Contributing to FlightRadar24 and FlightAware" loading="lazy"><figcaption>ADS-B Waterfall on 1.09 GHz</figcaption></figure><p>And if modulated in <a href="https://en.wikipedia.org/wiki/Amplitude_modulation">AM</a>, it would sound something like this:</p><!--kg-card-begin: html--><center>
    <audio src="https://www.sigidwiki.com/images/f/f8/ADSB_Sound.mp3" controls preload="none"></audio> <br>
<audio src="https://www.sigidwiki.com/images/5/5f/ADS-B_AM_mode.mp3" controls preload="none"></audio>
</center><!--kg-card-end: html--><h2 id="receiving-ads-b">Receiving ADS-B</h2><p>Receiving ADS-B is relatively easy as long as you have the correct equipment:</p><!--kg-card-begin: markdown--><ul>
<li>A working <a href="https://www.rtl-sdr.com/about-rtl-sdr/"><strong>RTL-SDR dongle</strong></a> that can receive at 1090 MHz. The R820T or R820T2 tuner is recommended for best performance at 1090 MHz.</li>
<li>A vertically polarized antenna tuned to 1090 MHz.</li>
<li>Optionally, a 1090 MHz Signal Filter</li>
<li>Software for listening and decoding ADS-B.</li>
<li>Software to graphically display the received aircraft location data.</li>
</ul>
<!--kg-card-end: markdown--><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blog.cdemi.io/content/images/2018/10/81a7NdCTt7L._SL1500_-min.jpg" class="kg-image" alt="Receiving Aircraft Surveillance Data and Contributing to FlightRadar24 and FlightAware" loading="lazy"><figcaption>RTL-SDR is a very cheap ~&#x20AC;20 USB dongle that can be used as a computer based radio scanner for receiving live radio signals in your area (no internet required).</figcaption></figure><p>Depending on the Antenna setup, you&apos;ll be able to pick up signals from aircrafts pretty far from your position, especially if you are outdoor and in a position with a good sky view.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blog.cdemi.io/content/images/2018/10/DSC_0990-1024x780-min.jpg" class="kg-image" alt="Receiving Aircraft Surveillance Data and Contributing to FlightRadar24 and FlightAware" loading="lazy"><figcaption>Indoor 3dBi ADS-B 1090Mhz SMA Antenna w/ Magnetic Base</figcaption></figure><p>I decided to hook these up to a <a href="https://www.raspberrypi.org/products/raspberry-pi-3-model-b-plus/">Raspberry Pi 3 B+</a> running a headless setup of Raspbian Stretch Lite.</p><h2 id="dump1090">Dump1090</h2><p>After installing the RTL-SDR drivers (`apt-get install rtl-sdr`) I then installed <a href="https://github.com/MalcolmRobb/dump1090">Dump1090</a>. Dump 1090 is a Mode S decoder specifically designed for these RTL-SDR devices.</p><h2 id="feed-data-to-flightradar24-and-flightaware">Feed Data to FlightRadar24 and FlightAware</h2><p>All that I needed to do now, was install the <a href="https://www.flightradar24.com/build-your-own">FlightRadar24</a> and <a href="https://flightaware.com/adsb/piaware/install">FlightAware</a> packages to feed them data from my dump1090 installation.</p><figure class="kg-card kg-image-card kg-width-full kg-card-hascaption"><img src="https://blog.cdemi.io/content/images/2018/10/PiAware-Dashboard-min.png" class="kg-image" alt="Receiving Aircraft Surveillance Data and Contributing to FlightRadar24 and FlightAware" loading="lazy"><figcaption>PiAware Web Interface on the Raspberry Pi</figcaption></figure><p>Currently, I&apos;m using an indoor antenna and my receiver is receiving ADS-B broadcasts from aircraft about 150 km away. I will soon upgrade to an outdoor antenna when I have time to lay some proper coax cabling, hopefully this will increase the range and get better data. </p><p>FlightAware also provides <a href="https://flightaware.com/adsb/stats/user/cdemi">a public dashboard where you can see contributions</a> &#x1F601;</p><h2 id="interested">Interested?</h2><p>If you&apos;re interested and want to get started here are some tips and links:</p><!--kg-card-begin: markdown--><ul>
<li><a href="https://flightaware.com/adsb/piaware/">PiAware - ADS-B and MLAT Receiver &#x2708; FlightAware</a></li>
<li><a href="https://www.flightradar24.com/build-your-own">Build your own ADS-B receiver &#x2013; Pi24</a></li>
<li><a href="https://www.modmypi.com/raspberry-pi/set-up-kits/rpi3-model-b-plus-kits/piaware-aircraft-tracking-kit-inc.-raspberry-pi-3">PiAware Aircraft Tracking Kit Inc. Raspberry Pi 3B+</a></li>
<li><a href="https://www.rtl-sdr.com/about-rtl-sdr/">About RTL-SDR</a></li>
<li><a href="https://www.rtl-sdr.com/rtl-sdr-quick-start-guide/">RTL-SDR Quick Start Guide</a></li>
<li><a href="https://www.reddit.com/r/ADSB/">/r/ADSB</a></li>
<li><a href="https://www.reddit.com/r/RTLSDR/">/r/RTLSDR</a></li>
<li><a href="https://www.reddit.com/r/amateurradio/">/r/AmateurRadio</a></li>
<li>Find your local amateur radio community:
<ul>
<li>Malta: <a href="http://www.9h1mrl.org/">Malta Amateur Radio League (<strong>MARL</strong>)</a></li>
<li>United Kingdom: <a href="http://rsgb.org/">Radio Society of Great Britain (<strong>RSGB</strong>)</a></li>
<li>United States: <a href="http://www.arrl.org/">American Radio Relay League (<strong>ARRL</strong>)</a></li>
<li>Canada: <a href="http://rac.ca/">Radio Amateurs of Canada (<strong>RAC</strong>)</a></li>
<li>Australia: <a href="http://www.wia.org.au/">The Wireless Institute of Australia (<strong>WIA</strong>)</a></li>
<li>New Zealand: <a href="http://www.nzart.org.nz/">New Zealand Association of Radio Transmitters (<strong>NZART</strong>)</a></li>
<li>Others can be found by Googling ones close to your location</li>
</ul>
</li>
</ul>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Cloudflare Hijacked my Ghost(Pro) Domain]]></title><description><![CDATA[Cloudflare will gladly delegate any of your domains that are pointing to any SaaS provider hosted on their platform. In this article I show how to take back control]]></description><link>https://blog.cdemi.io/cloudflare-hijacked-my-ghost-pro-domain/</link><guid isPermaLink="false">5e5f89a0f108e60001404e38</guid><category><![CDATA[Security]]></category><category><![CDATA[Infrastructure]]></category><dc:creator><![CDATA[Christopher Demicoli]]></dc:creator><pubDate>Sat, 20 Oct 2018 12:35:54 GMT</pubDate><media:content url="https://blog.cdemi.io/content/images/2018/10/CloudFlare-Hijack-Ghost-min.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.cdemi.io/content/images/2018/10/CloudFlare-Hijack-Ghost-min.png" alt="Cloudflare Hijacked my Ghost(Pro) Domain"><p>For those of you who don&apos;t know, <a href="https://www.cloudflare.com/">Cloudflare</a> is like a CDN on steroids. To use Cloudflare, you need to change your domain&apos;s nameservers (authoritative DNS servers). <a href="https://ghost.org/">Ghost(Pro)</a>, on the other hand, is the SaaS version of <a href="https://github.com/TryGhost/Ghost">Ghost</a>, an open-source blogging platform.</p><p>Since the first day I setup this blog, I put it behind Cloudflare. This means that all the traffic going to <a href="https://blog.cdemi.io/">blog.cdemi.io</a>, instead of going directly to Ghost(Pro) will pass through Cloudflare instead. In a way, Cloudflare will be like a man-in-the-middle, except in this case it will be a good man-in-the-middle.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blog.cdemi.io/content/images/2018/10/Cloudflare-MITM.png" class="kg-image" alt="Cloudflare Hijacked my Ghost(Pro) Domain" loading="lazy"><figcaption>Traffic flow</figcaption></figure><h2 id="advantages">Advantages</h2><!--kg-card-begin: markdown--><p>This gives me various advantages:</p>
<ul>
<li>Caching of static content closer to the end-user</li>
<li>Rate Limiting</li>
<li>Adjusting Security Level</li>
<li>Custom SSL Certificates</li>
<li>Access Rules</li>
<li>Custom Apps like Google Analytics</li>
</ul>
<!--kg-card-end: markdown--><p>All of these are really awesome features that are provided by Cloudflare and that I was making use of.</p><h2 id="ghost-pro-moves-to-cloudflare">Ghost(Pro) moves to Cloudflare</h2><p>Unfortunately for me, about 2 months ago, Ghost decided to move behind Cloudflare and this is when I received this email:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blog.cdemi.io/content/images/2018/10/chrome_2018-10-20_13-57-05-min.png" class="kg-image" alt="Cloudflare Hijacked my Ghost(Pro) Domain" loading="lazy"><figcaption>Email from Cloudflare</figcaption></figure><p>What?! So, <strong>my domain</strong> that is on <strong>my Cloudflare account</strong>, is now being given to Ghost(Pro)?! This sounded very bad, so naturally, I emailed Cloudflare to ask them not to do this, at least on my domain.</p><!--kg-card-begin: markdown--><p>I explained to them that this change means that I will lose:</p>
<ul>
<li>My custom security level settings</li>
<li>My custom SSL Certificate</li>
<li>My custom access rules</li>
<li>Google Analytics App</li>
</ul>
<!--kg-card-end: markdown--><p>After 2 different support engineers blatantly denied the effect this would have, the third one finally confirmed that:</p><blockquote>we [Cloudflare] don&apos;t provide any double clouding solutions for now</blockquote><p>He also confirmed that since this is their issue, <strong>he will put my domain on hold and not enable this on my account</strong>, which I thought was a good resolution of this ticket.</p><p>Unfortunately for me, on October 2nd, my monitoring systems alerted me that I had lost all visibility of traffic flowing through my Cloudflare account for this blog. Sure enough, I login to Cloudflare and see that I no longer have management access to my own subdomain on my own Cloudflare account.</p><p>After contacting Cloudflare support, <strong>they confirmed to me that even though they had agreed to hold my domain from being transferred to Ghost(Pro) they still went ahead and delegated it to them.</strong></p><figure class="kg-card kg-image-card kg-width-full kg-card-hascaption"><img src="https://blog.cdemi.io/content/images/2018/10/image-1.png" class="kg-image" alt="Cloudflare Hijacked my Ghost(Pro) Domain" loading="lazy"><figcaption>Ghost(Pro) now owns my subdomain on my Cloudflare account</figcaption></figure><p>This means, that with the new change I cannot even turn on &quot;Orange Cloud&quot; since I was no longer in control of my own domain.</p><p>After a lot of back and forth with the Team Leader of the Cloudflare support, I was still unable to convince him that this situation doesn&apos;t make any sense for me.</p><h2 id="gaining-back-control">Gaining back control</h2><p>After realizing that Cloudflare isn&apos;t going to delegate management of my own domain back to me, it occured to me that bypassing this logic wouldn&apos;t be that difficult.</p><p>All I needed to do was create a temporary subdomain that points to my ghost domain. I knew Cloudflare would hijack this domain and delegate it to Ghost, so as you can see, I cannot turn on &quot;Orange Cloud&quot;. After that, I pointed my <strong>actual</strong> blog domain to the temporary domain and turned on &quot;Orange Cloud&quot;. </p><figure class="kg-card kg-image-card kg-width-full kg-card-hascaption"><img src="https://blog.cdemi.io/content/images/2018/10/image-3.png" class="kg-image" alt="Cloudflare Hijacked my Ghost(Pro) Domain" loading="lazy"><figcaption>Temporary Domain pointing to Ghost, while actual domain pointing to temporary domain with Orange Cloud enabled</figcaption></figure><h2 id="conclusion">Conclusion</h2><p><strong>Cloudflare will gladly delegate any of your domains that are pointing to any SaaS provider hosted on their platform</strong>. Indeed I am on the free plan of their account, but I really doubt their response would have been different had I been a paying customer. Unfortunately, there isn&apos;t really an alternative to Cloudflare and they know that. I am one of Cloudflare&apos;s biggest advocates, I really believe in what they are doing for the internet and tech community in general. Let&apos;s hope that they don&apos;t end up like other companies who had the motto &quot;do no evil&quot;.</p><p>I doubt this trick will keep on working for a long time. If it&apos;s really true that they don&apos;t support &quot;double clouding&quot; this setup for sure does it. When they close that, I would have to spin up my own VMs to do my reverse-proxying in order to keep my domain from being delegated.</p>]]></content:encoded></item><item><title><![CDATA[Analyzing Data from a Public-Facing Honeypot]]></title><description><![CDATA[What happens if you setup a badly password protected server on the public internet without telling no one? How much time would it take before a botnet would try to hijack it?]]></description><link>https://blog.cdemi.io/analyzing-data-from-a-public-facing-honeypot/</link><guid isPermaLink="false">5e5f89a0f108e60001404e36</guid><category><![CDATA[Security]]></category><category><![CDATA[Infrastructure]]></category><category><![CDATA[Malware]]></category><dc:creator><![CDATA[Christopher Demicoli]]></dc:creator><pubDate>Sat, 23 Jun 2018 13:38:10 GMT</pubDate><media:content url="https://blog.cdemi.io/content/images/2018/06/Honeypot-min.png" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://blog.cdemi.io/content/images/2018/06/Honeypot-min.png" alt="Analyzing Data from a Public-Facing Honeypot"><p>A few days ago, I got the idea to deploy a public-facing honeypot.</p>
<blockquote>
<p>A honeypot is a computer security mechanism set to detect, deflect, or, in some manner, counteract attempts at unauthorized use of information systems. Generally, a honeypot consists of data (for example, in a network site) that appears to be a legitimate part of the site, but is actually isolated and monitored, and that seems to contain information or a resource of value to attackers, who are then blocked. - <em><a href="https://en.wikipedia.org/wiki/Honeypot(computing)">Wikipedia: Honeypot (computing)</a></em></p>
</blockquote>
<p>The aim was to give this honeypot a public IP (which I wouldn&apos;t advertize) and see how much time it takes before some bot would detect it and try to hijack it.</p>
<p>For this experiment, I deployed a Debian VM on <a href="https://www.hetzner.com/cloud?country=mt">the Hetzner Cloud</a> for &#x20AC;2.94 a month which is even cheaper than <a href="https://www.digitalocean.com/pricing/">DigitalOcean&apos;s $5 a month VM</a>. As a honeypot I opted for an open source project <a href="https://github.com/micheloosterhof">micheloosterhof</a>/<a href="https://github.com/micheloosterhof/cowrie">cowrie</a> which I had to fork to <a href="https://github.com/cdemi">cdemi</a>/<a href="https://github.com/cdemi/cowrie">cowrie</a>. The reason for this is that although <em>cowrie</em> supports posting to <a href="https://www.elastic.co/products/elasticsearch">Elasticsearch</a>, it didn&apos;t have any support for <a href="https://www.elastic.co/guide/en/elasticsearch/plugins/current/ingest.html">Ingest Plugins</a>, specifically, the <a href="https://www.elastic.co/guide/en/elasticsearch/plugins/current/ingest-geoip.html">Ingest Geoip Processor Plugin</a>.</p>
<p>Cowrie was configured to listen to SSH on Port 22 and Telnet on Port 23, this means that I had to install <code>authbind</code> to give permissions to run on these ports.</p>
<pre><code class="language-bash">sudo apt-get install authbind
sudo touch /etc/authbind/byport/22
sudo chown cowrie:cowrie /etc/authbind/byport/22
sudo chmod 770 /etc/authbind/byport/22
sudo touch /etc/authbind/byport/23
sudo chown cowrie:cowrie /etc/authbind/byport/23
sudo chmod 770 /etc/authbind/byport/23
</code></pre>
<p>Because I had enhanced cowrie to support Elasticsearch Ingest Plugins, I could now add a new Pipeline:</p>
<pre><code class="language-json">PUT _ingest/pipeline/geoip
{
  &quot;description&quot; : &quot;Add geoip info&quot;,
  &quot;processors&quot; : [
    {
      &quot;geoip&quot; : {
        &quot;field&quot; : &quot;src_ip&quot;
      }
    }
  ]
}
</code></pre>
<p>This GeoIP processor adds information about the geographical location of IP addresses, based on data from <a href="https://dev.maxmind.com/geoip/geoip2/geolite2/">the Maxmind databases</a>. This processor adds this information by default under the geoip field. The geoip processor can resolve both IPv4 and IPv6 addresses.</p>
<p>By adding a mapping to this index, Elasticsearch can identify the <code>geoip</code> field as a <code>geo_point</code> type. This will allow Kibana to display this on a Heatmap.</p>
<pre><code class="language-json">PUT _mapping/cowrie
{
  &quot;cowrie&quot;: {
    &quot;mappings&quot;: {
      &quot;cowrie&quot;: {
        &quot;properties&quot;: {
          &quot;geoip&quot;: {
              &quot;location&quot;: {
                &quot;type&quot;: &quot;geo_point&quot;
              }
          }
        }
      }
    }
  }
}
</code></pre>
<p>After the service was setup, it was time to turn it on. <strong>In less than 5 minutes</strong> after turning it on, a bot had already tried to login over Telnet to this machine!</p>
<p><img src="https://blog.cdemi.io/content/images/2018/06/Kibana-Dashboard.png" alt="Analyzing Data from a Public-Facing Honeypot" loading="lazy"></p>
<p>Unsurprisingly, most of the intrusion attempts came from China, Russia, Brazil, Japan and Korea.</p>
<p><img src="https://blog.cdemi.io/content/images/2018/06/chrome_2018-06-23_14-30-45-min.png" alt="Analyzing Data from a Public-Facing Honeypot" loading="lazy"></p>
<p><img src="https://blog.cdemi.io/content/images/2018/06/chrome_2018-06-23_14-35-22-min.png" alt="Analyzing Data from a Public-Facing Honeypot" loading="lazy"></p>
<p>Most of the attacks came over SSH, which is predictable since Telnet is practically an obsolete protocol and if you use it over the public internet, you should be shot.<br>
<img src="https://blog.cdemi.io/content/images/2018/06/chrome_2018-06-23_14-32-51-min.png" alt="Analyzing Data from a Public-Facing Honeypot" loading="lazy"></p>
<p>An interesting observation is that the connection attempts to the Honeypot increased gradually. One theory for this is that the botnet that discovered the Honeypot could have started advertising the Honeypot to other attackers. Alternatively, it stands to reason that the more time the honeypot stays active, the increased likelihood to be discovered.</p>
<p><img src="https://blog.cdemi.io/content/images/2018/06/chrome_2018-06-23_14-39-05-min.png" alt="Analyzing Data from a Public-Facing Honeypot" loading="lazy"></p>
<p>The most common username was, surprise surprise, <code>root</code> and <code>admin</code>. This goes to show how important it is to <strong>disable/rename your root and Administrator users</strong>.<br>
<img src="https://blog.cdemi.io/content/images/2018/06/chrome_2018-06-23_14-46-26-min.png" alt="Analyzing Data from a Public-Facing Honeypot" loading="lazy"></p>
<p><img src="https://blog.cdemi.io/content/images/2018/06/chrome_2018-06-23_14-50-35-min.png" alt="Analyzing Data from a Public-Facing Honeypot" loading="lazy"></p>
<p>Most of the commands being run on the Honeypot look like they are targeting IoT Devices (like Cameras, Routers, etc...) which run BusyBox. Most probably these are <em>Hajime</em> or <em>Mirai</em> botnets as their Reconnaissance phases are somewhat similar.<br>
<img src="https://blog.cdemi.io/content/images/2018/06/chrome_2018-06-23_14-54-00-min.png" alt="Analyzing Data from a Public-Facing Honeypot" loading="lazy"></p>
<p>Some of the commands are sent in a blind attempt to navigate whatever vendor-specific command-line interface (CLI) the Telnet server implements. <code>enable</code> is a common CLI command to allow access to privileged-mode commands. <code>system</code> attempts to navigate to a menu of system-management options. <code>shell</code> and <code>sh</code> attempt to run a Bourne shell.</p>
<p>The <code>/bin/busybox cat /proc/mounts; /bin/busybox ECCHI</code> commands are the botnet probing the system to look for writable mounts where to download the first stage binary. Note the repeat of the venerable <code>/bin/busybox ECCHI</code> command, which serves a purpose not dissimilar to its use before: <em>Hajime</em> and <em>Mirai</em> both use the <code>ECCHI: applet not found</code> signature to find the end of the command line&apos;s output.</p>
<p>The IP Addresses where to download the binary from might be of unsuspecting victims that have encountered the botnet and not necessarily that of the attacker.<br>
<img src="https://blog.cdemi.io/content/images/2018/06/chrome_2018-06-23_15-03-58-min.png" alt="Analyzing Data from a Public-Facing Honeypot" loading="lazy"></p>
<p>Another command that got my attention is <code>cat /bin/echo</code>. This command is used by the botnet so that it can inspect its header to determine the target&apos;s processor architecture. Once the target processor is determined, the botnet can execute the relevant binary.</p>
<h1 id="conclusion">Conclusion</h1>
<p>The internet is a dangerous place. Within minutes of leaving a Honeypot on the public internet several botnets have discovered it and tried to claim it for their own. It&apos;s important to follow security best practices when exposing stuff over the internet. Some of which:</p>
<ul>
<li>Move your SSH, RDP to non-standard ports</li>
<li>No Telnet!</li>
<li>Consider putting all non-public listening ports (sshd, RDP, SNMP, rsyslogd etc.) behind a VPN (or SSH Tunnel)</li>
<li>Try to use Key Authentication over SSH</li>
<li>Disable/Rename <code>root</code> or Admin users.</li>
<li>Badly made IoT Devices are very dangerous. Consider segregating them and firewalling them.</li>
</ul>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Implications of Privacy and Encryption on Smart Devices]]></title><description><![CDATA[In the recent past, there have been numerous debates on the privacy of personal data in devices like smartphones and laptops as well as on online sites like Facebook and Google.]]></description><link>https://blog.cdemi.io/implications-of-privacy-and-encryption-on-smart-devices/</link><guid isPermaLink="false">5e5f89a0f108e60001404e31</guid><category><![CDATA[Privacy]]></category><category><![CDATA[Security]]></category><category><![CDATA[Encryption]]></category><dc:creator><![CDATA[Christopher Demicoli]]></dc:creator><pubDate>Sun, 03 Jun 2018 00:06:46 GMT</pubDate><media:content url="https://blog.cdemi.io/content/images/2018/04/Privacy.png" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://blog.cdemi.io/content/images/2018/04/Privacy.png" alt="Implications of Privacy and Encryption on Smart Devices"><p>In the recent past, there have been numerous debates on the privacy of personal data in devices like smartphones and laptops as well as on online sites like Facebook and Google. On one hand, the government institutions and business organizations want to gain full control of people&#x2019;s data for business purposes and surveillance while on the other hand, the users of the gadgets want to be assured of their privacy and that their information will be not be used by unauthorized people for selfish gains. This trend has been observed all over the world especially in the UK and in the United States. The need to have control over people&#x2019;s privacy has erupted a conflict between Apple Inc. and the federal government whereby Apple refused to unlock a phone of a terror suspect despite the court giving such orders. That incident elicited arguments on data encryption and its limits when it comes to cybersecurity. The validity or invalidity of this argument depends on different perspectives; legal, ethical, social, and professional.</p>
<p>From an ethical perspective, the argument could be viewed and determined using utilitarian ideas that the most appropriate way of deciding an ethical issue is determining the decision with the best consequences. Relating this to how the privacy issue has turned out, the argument will be determined by considering the side that has most dire consequences. The one where citizens including criminals can secure their transactions in devices, or the one where the government infringes people&#x2019;s privacy and spies on its citizens.</p>
<p>Both the social and ethical justifications of surveillance are based on the pretext of &#x201C;safety by instilling fear&#x201D;. Security agencies claim that terrorists and criminals with ill intentions use encryption to hide their activities hence the need to monitor people&#x2019;s devices. Encryption is critical because it guarantees people&#x2019;s intellectual privacy. In other words, encryption protects us from surveillance when we are making sense of the surrounding through reading, thinking, and even communicating privately with the people we trust most. With the growth of technology, intrinsic activities like thinking and communication were facilitated by gadgets like smartphones and computers. Even during shopping and recreation, people use these devices which record historical usage information. However, when people are monitored, they tend to act differently. Stoycheff&#x2019;s study shows that internet surveillance prevents people from reading or contributing to controversial issues. The threat posed by this tendency is well understood by illustrating how the most celebrated ideologies in the modern world such as holding the government accountable and equality for all were once controversial ideas decades ago. A free and democratic society should not be wary of &#x201C;dangerous ideas&#x201D; neither does it need intellectual surveillance.</p>
<p>It is true that encryption has the potential of making the work of security agencies difficult. However, the issue should not be treated as an isolated case because the difficulties introduced by encryption are similar to those introduced by civil liberties like freedom of speech, the need for a warrant before security officials invade our privacy and the democratic control of the security agencies. Society is more secure when it has hope than when it is gripped with fear and perceived as potentially naughty kids that need to be tamed. After all, backdoors used by the government can be used by criminals and hackers.</p>
<p>The legal and professional implications of the debate on encryption are well demonstrated in the speech by the then FBI Director James Comey in 2014. Comey stated that the leak by Snowden had caused a lot of fear and mistrust which made tech companies overreact to Snowden&#x2019;s leak. He underplayed the need for encryption by referring to it as a marketing strategy. In an attempt to make surveillance appear legally acceptable, he objected to the use of the term &#x201C;backdoor&#x201D; and stated their urge to use the front door that has clarity, transparency, and guided clearly by the law. Comey reiterated their adherence to court orders and the legal process that allows them to obtain the information required to conduct investigations on criminals and terrorists. While that statement might appear reasonable and legitimate, there are professional, legal, and ethical objections to the installation of decryption technology in personal devices. These objections apply to the legalization of surveillance on UK citizens through the Investigatory Powers Act.</p>
<p>From a professional perspective, it is difficult to regulate who use the backdoor. Cryptographers argue that the modern field of computer technology is increasingly becoming democratized. In other words, today&#x2019;s government secrets could be ideas for someone&#x2019;s research project tomorrow and in the next day used as tools for a cyber-attack. For this reason, the installation of a backdoor does not guarantee that it will not be found by someone else and used for malicious purposes. That possibility is demonstrated by the Vodafone hack that took place in Greece in 2005 whereby a legal wiretapping connection used by security officials was compromised leading to spying on of hundreds of people. Similar incidences have been reported in other countries, even by Snowden leaks themselves.</p>
<p>Professional cryptographers further allude that the feasibility of decryption software or building of a backdoor is limited to the theoretical stage. In the past, the NSA has made huge strides in developing a secure backdoor that can only be used by the agency. Although the software used by the NSA is one of the global standards used to create encryption codes, the leak by Snowden revealed that as early as 2000, the NSA discovered a loophole in the code which they exploited to discover the outcome of the random number generator exclusively, hence enabling them to decrypt the common encryption keys. Concerns in the IT profession arose after the discovery that cryptographers had already noted a weakness in the code even before Snowden blew the whistle. Unfortunately, at that stage, they could not prove it. These suspicions were exacerbated after the Snowden leak indicating that even the most sophisticated intelligence agency in the world could not secure its data and secrets. This theory demonstrates the professional implications of legalizing surveillance and creating a backdoor.</p>
<p>From a realist point of view, the Investigatory Powers Bill in the UK does not have any legal or professional implications. Currently, we are living in an era commonly known as &#x201C;the golden era of surveillance&#x201D; whereby the security agencies read and intercept vast amounts of personal data. The increased rate at which people&#x2019;s activities are facilitated and mediated by technology has, in turn, increased the amount of digital information left behind about ourselves. It is important to note that encryption only helps a user conceal the content of the messages but not their context, widely known as metadata. The metadata identifies what one reads, the people you communicate with and their location. Metadata has become a popular tool to the extent where Michael Hayden, former NSA director, once boasted that they kill criminals using metadata. In addition, big business organizations and security agencies have developed methods of hacking endpoints in communication systems such as the personal devices we use daily. As a result, a new business niche has emerged that involves identification and trading of software weaknesses for exploitation. In fact, the UK and US governments are alleged to hire the services of companies like Hacking Team, Gamma, International, and VUPEN that sell unidentified software vulnerabilities. Given that the use of internet and computer devices, this is only expected to increase in the future. This means that the magnitude of metadata available for use by governments will inevitably increase. That leads to the conclusion that with or without the backdoor, the government still has tons of freely available information for exploitation. While this tendency might be legally and professionally acceptable, it is not acceptable from a social and ethical perspective.</p>
<p>The social, ethical, and professional implications are demonstrated by the analysis of the trade-off between privacy and security especially from an economic standpoint. While it might be possible to install backdoors, the cost would be too huge in many aspects. From a professional point of view, it is possible that the security agencies can install backdoors that are legally allowed but it is likely that the business organizations would exploit this loophole in carefully choreographed treachery. That tendency could also be witnessed if the UK government would force telecom companies to provide them with centralized access, which would significantly stunt innovation. Further, the social and professional implications would be noted by the stifling of innovation especially in academic research where researchers and scholars would want to protect their backdoor from suspicious professors.</p>
<p>The implications of legalized surveillance on innovation in IT profession are well demonstrated by the economics of complying with the regulations. Until a decade ago, the telecom business was monopolized by big companies many of which were state-owned. The rate of change of the architecture of their systems was low hence easy and cheap to create and incorporate a surveillance system into them. However, that trend has changed whereby the tech industry now comprises of many start-ups that develop communication systems in various forms. With every feature that these start-ups add to their systems, the architecture of their system also changes. Therefore, it would mean that these start-ups have to incur high costs to ensure they comply with the government regulations of legalized interception and decryption of their traffic. To avoid these costs, the companies would prefer not to innovate and make changes to their systems.</p>
<p>If the government was to force the tech companies to allow wiretapping into their systems, it would mean a threat to their existence and growth. Typically, backdoors are characterized by the centralized flow of information. However, most revolutionary innovations in the contemporary world are characterized by the decentralized flow of information. In the recent past, we have seen an increase in the use of peer-to-peer technology where computers communicate with each other without the need for a centralized control. These technologies include file storage services, communication services, and payment processing services. Given that it is extremely difficult to wiretap such systems, the implementation of forceful surveillance and wiretapping would mean that the companies providing these services cease to exist.</p>
<p>While the designers of the Investigatory Power Act might have had good intentions, the legislation has significant potential adverse implications for the UK&#x2019;s tech companies. Globally, it has been noted that administrations that require tech companies to install backdoors significantly affect their export opportunities. That tendency has been noted in Chinese tech companies like Huawei that have encountered challenges in penetrating overseas markets for fear that their devices have backdoors. In the same way, US cloud storage companies have been unable to win over foreign customers for fear that the NSA could use backdoors to monitor their data.</p>
<p>In conclusion, the debate whether to opt for privacy or security is erroneous. The choice should be between targeted surveillance and mass surveillance. While encryption of data by default would render legitimate efforts of interception and decryption harder, it would only be difficult for mass surveillance. Security officials would still be able to carry out targeted surveillance. Even with targeted surveillance, there would be many viable options to enforce it. Some of them include remote hacking of devices and mass retention of data for all institutions and companies. With the enactment of the Investigatory Powers Act, there are many professional, ethical, social, and legal implications. As of now, it is still unclear how the government will implement a robust mechanism to prevent the abuse of surveillance tools such malware and backdoors. The implementation of this Act has elicited a tussle between the security officials and the tech companies. Regardless of the outcome of this tussle, it is clear that a robust strategy is needed that would address the fears of all interested parties. Importantly, a sophisticated, robust, and secure solution is urgently needed to protect people&#x2019;s right to privacy.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[What's Coming in C# 8.0? Records]]></title><description><![CDATA[One of the new features being proposed in C# 8.0 is to introduce Records. They are essentially a very lightweight class that is a collection of fields.]]></description><link>https://blog.cdemi.io/whats-coming-in-c-8-0-records/</link><guid isPermaLink="false">5e5f89a0f108e60001404e35</guid><category><![CDATA[C# 8.0]]></category><category><![CDATA[C#]]></category><category><![CDATA[Software Development]]></category><category><![CDATA[.NET]]></category><dc:creator><![CDATA[Christopher Demicoli]]></dc:creator><pubDate>Sun, 27 May 2018 11:58:23 GMT</pubDate><media:content url="https://blog.cdemi.io/content/images/2018/05/C--2.png" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://blog.cdemi.io/content/images/2018/05/C--2.png" alt="What&apos;s Coming in C# 8.0? Records"><p>Again, before I go any further, I would like to point out that as I&apos;m writing this, the feature-set for C# 8.0 still hasn&apos;t been decided. This means that <mark><strong>information written here is subject to change</strong></mark>.</p>
<p>One of the new features being proposed in C# 8.0 is to introduce Records. <strong>Records are a new, simplified declaration form for C# class and struct types that combine the benefits of a number of simpler features.</strong> Essentially, Records are a way to create very lightweight classes that are just a collection of fields (POCO).</p>
<p>The <strong>Records</strong> syntax should allow implementation of these classes and structs with absolute minimum code:</p>
<pre><code class="language-csharp">public record BlogPost(string Slug, string Title, string Body, DateTime DatePublished);
</code></pre>
<p>This would be expanded out to a much larger class that also implements <code>IEquatable</code>.</p>
<pre><code class="language-csharp">using System;

public class BlogPost : IEquatable&lt;BlogPost&gt;
{
    public string Slug { get; }
    public string Title { get; }
    public string Body { get; }
    public DateTime DatePublished { get; }

    public BlogPost(string Slug, string Title, string Body, DateTime DatePublished)
    {
        this.Slug = Slug;
        this.Title = Title;
        this.Body = Body;
        this.DatePublished = DatePublished;
    }

    public bool Equals(BlogPost other)
    {
        return Equals(Slug, other.Slug) &amp;&amp; Equals(Title, other.Title) &amp;&amp; Equals(Body, other.Body) &amp;&amp; Equals(DatePublished, other.DatePublished);
    }

    public override bool Equals(object other)
    {
        return (other as BlogPost)?.Equals(this) == true;
    }

    public override int GetHashCode()
    {
        return (Slug.GetHashCode() * 17 + Title.GetHashCode() + Body.GetHashCode() + DatePublished.GetHashCode());
    }

    public void Deconstruct(out string Slug, out string Title, out string Body, out DateTime DatePublished)
    {
        Slug = this.Slug;
        Title = this.Title;
        Body = this.Body;
        DatePublished = this.DatePublished;
    }

    public BlogPost With(string Slug = this.Slug, string Title = this.Title, string Body = this.Body, DateTime DatePublished = this.DatePublished) =&gt; new BlogPost(Slug, Title, Body, DatePublished);
}
</code></pre>
<p>As you can see, the properties of the record are created as <strong>read-only properties with a constructor</strong> for initializing them. In addition, it <strong>also implements value equality</strong> and <strong>overrides <code>GetHashCode</code> correctly</strong> for use in hash-based collections, such as <code>Dictionary</code> and <code>HashTable</code>.</p>
<p>Apart from this, we can also see that it has <strong>implemented a <code>Deconstruct</code> method</strong>, for deconstructing the class into individual values with the tuple syntax:</p>
<pre><code class="language-csharp">var (Slug, Title, Body, DatePublished) = blogPost;
</code></pre>
<p>Lastly, we can see the <strong>implementation of the <code>With</code> method</strong>. This is a new introduction to the language as well. Method parameter&apos;s default argument will additionally allow referencing a class field or property using such syntax. This is particularly useful for implementing the <code>With</code> helper method dedicated to creating modified copies of existing immutable objects, e.g.:</p>
<pre><code class="language-csharp">var newerBlogPost = blogPost.With(DatePublished: DateTime.Now.AddDays(20));
</code></pre>
<p>Additionally the with expression syntax is being considered as well, as syntactic sugar, for calling this method:</p>
<pre><code class="language-csharp">var newerBlogPost = blogPost with { DatePublished = DateTime.Now.AddDays(20) };
</code></pre>
<p>If you want to investigate Records in more detail, I suggest you have a look at <a href="https://github.com/dotnet/csharplang/blob/master/proposals/records.md">the dotnet feature proposal on GitHub</a>, which goes into more detail about caller-receiver parameters, with-expressions, declaration syntax and much more.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Planning a Wedding the Agile way]]></title><description><![CDATA[One of the duties of the best man is to assist the groom (and bride) in the preparations. It occured to me that Agile might just be the best way to plan a Wedding!]]></description><link>https://blog.cdemi.io/planning-a-wedding-the-agile-way/</link><guid isPermaLink="false">5e5f89a0f108e60001404e34</guid><category><![CDATA[Process Management]]></category><category><![CDATA[People]]></category><category><![CDATA[General]]></category><category><![CDATA[Agile]]></category><category><![CDATA[Kanban]]></category><dc:creator><![CDATA[Christopher Demicoli]]></dc:creator><pubDate>Sat, 12 May 2018 13:02:36 GMT</pubDate><media:content url="https://blog.cdemi.io/content/images/2018/05/wedding.png" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://blog.cdemi.io/content/images/2018/05/wedding.png" alt="Planning a Wedding the Agile way"><p>Two of my best friends since forever are getting married next year and I couldn&apos;t be happier! As a best man, one of the duties is to assist the groom (and bride) on their wedding preparations. <strong>It occurred to me that using Agile methodologies might just be the best way to plan a Wedding.</strong></p>
<p>When you think about it, <strong>Wedding planning is not that different from software development planning. We have a budget, a delivery date (the big day) and a colossal list of tasks with varying priorities.</strong></p>
<p>For those of us that work in Software Development it might be a natural choice to solve planning problems this way. Working in an agile environment for the past several years has lead me to approach projects in another light and can help reduce the complexity in everyday lives. In this case, the groom, the bride and the rest of the wedding task force team have no idea what a Kanban Board is, so part of the challenge is to demonstrate what Agile is, how it works and why it is advantageous.</p>
<h2 id="agilesoftwareweddingdevelopment">Agile <s>Software</s> Wedding Development</h2>
<p>The term &quot;agile&quot; was coined in <a href="http://agilemanifesto.org/">the 2001 Agile Manifesto</a>. Agile software development is an approach to software development that advocates incremental delivery, team collaboration, continual planning, and continual learning.</p>
<p>Agile is not a &quot;<em>thing</em>&quot;... you don&apos;t &quot;<em>do Agile</em>&quot;; rather agile is a mindset that you use to approach software development. There isn&apos;t one approach that works for all situations, rather &quot;Agile&quot; has come to represent a variety of methods and practices that align with the value statements in the manifesto.</p>
<p>Agile <strong>advocates discipline in adaptive, continual planning, early delivery and continual improvement and most of all <mark>encourages rapid and flexible response to change</mark></strong>. Finally agile practices should not just be followed blindly, but rather apply what makes sense to your environment.</p>
<p>In a wedding agile team, we have <strong>the bride and the groom</strong> (<strong>team members, product owners and active stake holders</strong>), the <strong>best man</strong> (the <strong>Scrum Master and team member</strong>) and the <strong>Groomsmen and Bride&apos;s Maids</strong> (<strong>team members</strong>).</p>
<h3 id="thescrummaster">The Scrum Master</h3>
<p>The <strong>scrum master is accountable for removing impediments to the ability of the team to deliver the product goals and deliverables</strong>. The scrum master is not a traditional team lead or project manager but acts as a buffer between the team and any distracting influences. The scrum master also ensures that the Scrum framework is followed. The role has also been referred to as a <strong>team facilitator</strong> or <strong>servant-leader</strong> to reinforce these dual perspectives. Some of the core responsibilities of the scrum master are:</p>
<ul>
<li>Helping the product owners (remember in this case the Bride and the Groom are produce owners) maintain the backlog (To-Do List) in a way that ensures the needed work is well understood so the team can continually make forward progress</li>
<li>Helping the team to determine the definition of done for the product, with input from key stakeholders</li>
<li>Coaching the team, within the Scrum principles</li>
<li>Promoting self-organization within the team</li>
<li>Helping the scrum team to avoid or remove impediments to its progress, whether internal or external to the team</li>
</ul>
<h2 id="kanban">Kanban</h2>
<p>Kanban is a lean agile methodology to manage and improve work across human systems. Funnily enough, the underlying Kanban method originated in lean manufacturing inspired by <a href="https://en.wikipedia.org/wiki/Toyota_Production_System">the Toyota Production System</a>.</p>
<p>In Kanban, work items are visualized to give participants a view of progress and process, from start to finish usually via a Kanban board.</p>
<h3 id="thekanbanboard">The Kanban Board</h3>
<p>For a Kanban Board I decided to use <a href="https://trello.com/">Trello</a> mainly because it is easy and free although not as advanced as I would have wished.</p>
<p>Although Kanban does not require that the team use a Kanban board, it is the preferred way to see the flow of work, get the participation of the team, and manage work.</p>
<p>A Kanban board shows how work moves from left to right, each column represents a stage within the value stream. In our case, this is the Kanban Board for the wedding.</p>
<p><img src="https://blog.cdemi.io/content/images/2018/05/chrome_2018-05-12_14-36-21-min.jpg" alt="Planning a Wedding the Agile way" loading="lazy"></p>
<p>Instantly, everyone (including the Bride and Groom) can visualize work in progress and understand complex information like processes, task relationships and risks related to a team&apos;s ability to complete work on time. It is easier for us to process information with a visual aid than without.</p>
<h2 id="why">Why?</h2>
<p>From various Movies and TV Shows, <strong>it is clear to me that Wedding Planning can never be stress-free</strong>. My aim is that by adopting Agile Methodologies to Wedding Planning, I can make this an a less-stressful process for the Bride and Groom. Having specific deadlines and time frames that are apparent to everyone on the team makes everything a lot easier. The team can be super organized and help stay on task.</p>
<p>For this to work with most efficiency, we need to touch base frequently and give each other updates on where we are on the tasks we are working on. Over the next few months, using agile is going to be essential to help create efficiencies as we start working on the website, save the date/invitations and finalizing the guest list.</p>
<p>I hope that everyone can realize that <strong>Agile is not something that you just do on Software (or at work)</strong>. In essence, it is <strong>the concept of Divide and Conquer that we have been using for ages taken into the 21st century</strong>. <mark><strong>Split tasks into smaller tasks, start somewhere and do continuous improvement. Dealing with change is inevitable and we have to learn to response to the unexpected.</strong></mark></p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[What's Coming in C# 8.0? Default Interface Methods]]></title><description><![CDATA[One of the new features being proposed in C# 8.0 is to add support for virtual extension methods (methods in interfaces with concrete implementations)]]></description><link>https://blog.cdemi.io/whats-coming-in-c-8-0-default-interface-methods/</link><guid isPermaLink="false">5e5f89a0f108e60001404e33</guid><category><![CDATA[C# 8.0]]></category><category><![CDATA[C#]]></category><category><![CDATA[.NET]]></category><category><![CDATA[Software Development]]></category><dc:creator><![CDATA[Christopher Demicoli]]></dc:creator><pubDate>Tue, 01 May 2018 12:06:08 GMT</pubDate><media:content url="https://blog.cdemi.io/content/images/2018/05/C-.png" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://blog.cdemi.io/content/images/2018/05/C-.png" alt="What&apos;s Coming in C# 8.0? Default Interface Methods"><p>Again, before I go any further, I would like to point out that as I&apos;m writing this, the feature-set for C# 8.0 still hasn&apos;t been decided. This means that <mark><strong>information written here is subject to change</strong></mark>.</p>
<p>One of the new features being proposed in C# 8.0 is to add support for <em>virtual extension methods</em> (methods in interfaces with concrete implementations). Java already has something similar called <a href="https://docs.oracle.com/javase/tutorial/java/IandI/defaultmethods.html">Default Methods</a>.</p>
<h2 id="why">Why?</h2>
<p>The main reason to introduce Default Interface Methods is to <strong>enable developers to add methods to an interface in future versions without breaking source or binary compatibility with existing implementations of that interface</strong>. Coincidentally, adding default interface implementations to a language also introduces a new language feature: <a href="https://en.wikipedia.org/wiki/Trait_(computer_programming)">traits</a>. <a href="http://scg.unibe.ch/archive/papers/Scha03aTraits.pdf">Traits have proven to be a powerful programming technique</a>.</p>
<h2 id="how">How?</h2>
<p>The simplest way of how to use this feature is by adding a <em>concrete method</em> in an interface, which is a method with a body.</p>
<pre><code class="language-csharp">interface IMyInterface
{
    void MyMethod() { Debug.Log(&quot;IMyInterface.MyMethod()&quot;); }
}
</code></pre>
<p>A class that implements this interface need not implement its concrete method.</p>
<pre><code class="language-csharp">class MyClass : IMyInterface {} // This is allowed by the compiler since MyClass implements MyMethod

IMyInterface i = new MyClass();
i.MyMethod(); // prints &quot;IMyInterface.MyMethod()&quot;
</code></pre>
<p>As a practical example, let&apos;s imagine that we are writing a Wallet Service and we have this interface declaration:</p>
<pre><code class="language-csharp">public interface IWallet{
    void PerformTransaction(decimal amount, string description);
}
</code></pre>
<p>With the introduction of this feature, we can easily enhance <code>IWallet</code> (even without making any breaking changes) as follows:</p>
<pre><code class="language-csharp">public interface IWallet{
    void PerformTransaction(decimal amount, string description);
    void Debit(decimal amount, string description){
        PerformTransaction(amount * -1, description);
    }
    void Credit(decimal amount, string description){
        PerformTransaction(amount, description);
    }
}
</code></pre>
<h2 id="wontinterfacesbecomeabstractclasses">Won&apos;t Interfaces become Abstract Classes?</h2>
<p>In a way yes, but also no. There&apos;s no multiple inheritance in languages like C# and Java (before Java SE 9), which means you can&apos;t inherit from more than one class. On the other hand, a class is (and will continue to be) able to implement several interfaces. Another thing which still keeps interfaces unique is <a href="https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/covariance-contravariance/">Covariance and Contravariance</a>.</p>
<h2 id="followdevelopment">Follow Development</h2>
<p>If you are interested in participating in discussions about this issue or just want to follow progress, <a href="https://github.com/dotnet/csharplang/blob/master/proposals/default-interface-methods.md">have a look at the proposal on dotnet/csharplang GitHub</a>.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[What's Coming in C# 8.0? Nullable Reference Types]]></title><description><![CDATA[One of the features being discussed for introduction in C# 8.0 is Nullable Reference Types. A proficient C# Developer might say "What?! Aren't all reference types nullable?" ]]></description><link>https://blog.cdemi.io/whats-coming-in-c-8-0-nullable-reference-types/</link><guid isPermaLink="false">5e5f89a0f108e60001404e32</guid><category><![CDATA[C# 8.0]]></category><category><![CDATA[C#]]></category><category><![CDATA[Software Development]]></category><category><![CDATA[.NET]]></category><dc:creator><![CDATA[Christopher Demicoli]]></dc:creator><pubDate>Mon, 30 Apr 2018 12:23:52 GMT</pubDate><media:content url="https://blog.cdemi.io/content/images/2018/04/C-.png" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://blog.cdemi.io/content/images/2018/04/C-.png" alt="What&apos;s Coming in C# 8.0? Nullable Reference Types"><p>Before I go any further, I would like to point out that as I&apos;m writing this, the feature-set for C# 8.0 still hasn&apos;t been decided. This means that <mark><strong>information written here is subject to change</strong></mark>.</p>
<p>One of the features being discussed for introduction in C# 8.0 is <strong>Nullable Reference Types</strong>. A proficient C# Developer might say &quot;<em>What?! Aren&apos;t all reference types nullable?</em>&quot; It&apos;s true, in C#, unlike other languages such as F#, <code>null</code> is the default value of every reference type. What else would the default value be? What other value would a variable have, until you can decide what else to assign to it? What other value could we pave a freshly allocated array of references over with, until you get around to filling it in?</p>
<p>Also, sometimes <code>null</code> is a sensible value in and of itself. Sometimes you want to represent the fact that, say, a field doesn&apos;t have a value. That it&apos;s OK to pass &quot;nothing&quot; for a parameter. The emphasis is on sometimes, though. And herein lies another part of the problem: Languages like C# don&apos;t let you express whether a null right here is a good idea or not.</p>
<p>Yet!</p>
<h2 id="how">How?</h2>
<p>From C# 8.0, all reference types will be considered to be non-nullable by default. When you want a nullable reference type you will have to express that explicitly. Yes, a consequence of this design choice is that <em><strong>this will add new warnings or errors to existing code!</strong></em></p>
<p>Here is what a sample <code>BlogPost</code> class will look like in C# 8.0:</p>
<pre><code class="language-csharp">class BlogPost
{
    string title;   // Definitely not null
    string? shortDescription; // May be null
    string body;    // Definitely not null
    
    void test()
    {
        title = null; // WARNING! Cannot convert null to non-nullable reference
        shortDescription = null; // OK
        var length = shortDescription.Length; // Warning: Possible dereference of a null reference
        if(shortDescription != null) 
        { 
            var length = shortDescription.Length; // OK, you checked 
        }
    }
}
</code></pre>
<p>This means that this class is now able to express the intent that every blog post has a <code>Title</code> and <code>Body</code> but only some blog posts have a <code>ShortDescription</code>. In fact, this is why this language feature is called &quot;nullable reference types&quot;. Those are the ones that are being added to the language. The nonnullable ones are already there, at least syntactically.</p>
<p>The fact that this is a breaking change, is by design. Microsoft want it to complain about your existing code because part of the purpose of this feature is to find bugs in existing code. Having said that, the C# Design Team have implemented these in such a way to make developer&apos;s life easier. Firstly, <strong><code>null</code> behavior will be in the form of warnings, not errors</strong> and secondly, <strong>there&apos;s going to be a compiler switch to turn these new warnings on or off</strong>.</p>
<h2 id="why">Why?</h2>
<p>So, now that we know how this new feature works, one my ask &quot;Why does the C# Design Team feel the need to introduce this?&quot;</p>
<p>The reason is the terrifying <code>NullReferenceException</code>! We&apos;ve all run into this exception plenty of times and they are mistakes that could have easily been caught at compile time if only we had the means to express it. Nullable reference types don&apos;t solve this problem, but they do allow us to express our intent much better. <strong>This is the only way to force developers be aware that a reference type may be nullable or cannot be nullable.</strong></p>
<h2 id="tryitout">Try it out!</h2>
<p>If you would like to try out this feature before it is even released, I suggest you read <a href="https://github.com/dotnet/csharplang/wiki/Nullable-Reference-Types-Preview#frequently-asked-questions">The C# Nullable Reference Types Preview on C# Language GitHub</a>. In there you will find Installation (and Uninstallation Instructions) as well as the ability to give feedback to the C# Design Team.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Bypassing Active Directory Group Policy]]></title><description><![CDATA[Networks that run with users as local administrators have no way to enforce policies on their organization's computers. In this post, I show how and why.]]></description><link>https://blog.cdemi.io/bypassing-active-directory-group-policy/</link><guid isPermaLink="false">5e5f89a0f108e60001404e30</guid><category><![CDATA[Security]]></category><category><![CDATA[Windows]]></category><category><![CDATA[Infrastructure]]></category><dc:creator><![CDATA[Christopher Demicoli]]></dc:creator><pubDate>Fri, 23 Mar 2018 13:39:55 GMT</pubDate><media:content url="https://blog.cdemi.io/content/images/2018/03/Bypassing-Active-Directory-Group-Policy-min.png" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://blog.cdemi.io/content/images/2018/03/Bypassing-Active-Directory-Group-Policy-min.png" alt="Bypassing Active Directory Group Policy"><p>Group Policy is a feature of an Active Directory environment where it provides a centralized management and configuration of operating systems, applications and users&apos; settings. If you&apos;re a System/Network Administrator, you&apos;ve surely used them to enforce a corporate security policy, and if you&apos;re a user, you&apos;ve almost certainly been frustrated by the limitations imposed by these policies.</p>
<p>Unfortunately, there is one big problem with this, or rather with how organizations deploy their security infrastructure. <strong>If users in your Active Directory domain belong to the <code>Local Administrators</code> Group, they can get around these policies any time they want.</strong></p>
<h2 id="how">How?</h2>
<p>In essence, policies are applied as follows:<br>
<img src="https://blog.cdemi.io/content/images/2018/03/Group-Policy-Order-of-Precedence-1.svg" alt="Bypassing Active Directory Group Policy" loading="lazy"></p>
<p>This means that since the GPOs are applied last, they will be the ones overriding your Local Policy. The problem with this is that <strong>all policies, essentially, are changes to Registry Keys</strong>. This means that in order to bypass Active Directory Group Policy changes, all you need to do is to identify the policy&apos;s setting location and change it!</p>
<p>There are many group policy references available, but since machine group policy settings store in the <code>HKEY_LOCAL_MACHINE</code> branch of the Registry and per-user group policy settings store in <code>HKEY_CURRENT_USER</code>, if you don&apos;t know the location of the setting that&apos;s preventing you from doing something you want you can use <a href="https://docs.microsoft.com/en-us/sysinternals/downloads/regmon"><code>RegMon</code> (now replaced by Process Monitor)</a> to find it.</p>
<h2 id="example">Example</h2>
<h3 id="restoreaccesstoremovablestorage">Restore Access to Removable Storage</h3>
<p>For example, a very common policy applied is to <strong>Deny Access to Removable Storage</strong> as follows:<br>
<img src="https://blog.cdemi.io/content/images/2018/03/RSOP.png" alt="Bypassing Active Directory Group Policy" loading="lazy"></p>
<p>This means that as soon as this policy is applied, we should find equivalent Registry Keys showing this policy. In this case, we will find the Keys at <code>Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\RemovableStorageDevices</code><br>
<img src="https://blog.cdemi.io/content/images/2018/03/regedit.png" alt="Bypassing Active Directory Group Policy" loading="lazy"></p>
<p>As expected, with this policy and registry keys, in place, the user can no longer access his Removable Storage devices.<br>
<img src="https://blog.cdemi.io/content/images/2018/03/Access-Denied.png" alt="Bypassing Active Directory Group Policy" loading="lazy"></p>
<p>So, in this case, all we need to do is just delete these Registry Keys and re-connect our removable storage. We can either do this manually or <strong>just run <code>reg delete &quot;HKLM\SOFTWARE\Policies\Microsoft\Windows\RemovableStorageDevices&quot; /f</code> in an elevated command prompt</strong>. Voil&#xE0;, you can now access your removable storage again.</p>
<h3 id="skipwindowsserverupdateservices">Skip Windows Server Update Services</h3>
<p>Most of the times, system administrators in an organization point to their WSUS in order to reduce download bandwidth. Unfortunately, most of the time, these servers are never updated or the updates are not approved. In order to switch back to Microsoft&apos;s official update servers to have the latest security patches, you can just run in an elevated Command Prompt:</p>
<pre><code class="language-bash">reg add &quot;HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU&quot; /f /v UseWUServer /t REG_DWORD /d 0
net stop wuauserv
net start wuauserv
</code></pre>
<h2 id="conclusion">Conclusion</h2>
<p>This blog post tries to highlight the fact that <strong>networks that run with users as local administrators have no way to enforce policies on their organization&apos;s computers</strong>. The reason that most networks leave their users with so much power is that many applications violate basic security programming guidelines and won&apos;t run otherwise.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Meeting Woz]]></title><description><![CDATA[What an honor to meet the Silicon Valley icon who has shaped the computing industry in the early days with his design of Apple's first line of products the Apple I and II, and his influence on the Mac]]></description><link>https://blog.cdemi.io/meeting-woz/</link><guid isPermaLink="false">5e5f89a0f108e60001404e2f</guid><category><![CDATA[People]]></category><category><![CDATA[General]]></category><dc:creator><![CDATA[Christopher Demicoli]]></dc:creator><pubDate>Tue, 06 Mar 2018 18:43:59 GMT</pubDate><media:content url="https://blog.cdemi.io/content/images/2018/03/Meeting-The-Woz-3.png" medium="image"/><content:encoded><![CDATA[<!--kg-card-begin: markdown--><img src="https://blog.cdemi.io/content/images/2018/03/Meeting-The-Woz-3.png" alt="Meeting Woz"><p>Today was a very special day for me; it was <strong>the day I met <a href="https://en.wikipedia.org/wiki/Steve_Wozniak">Steve Wozniak</a></strong>!</p>
<p>The opportunity came when for <a href="https://www.gig.com">GiG</a>&apos;s 5 Year Anniversary Event, named <strong>GiGsters Connect</strong>, our organization invited over Steve Wozniak for a fireside chat.</p>
<p>Of course, as soon as I heard this, I quickly turned euphoric and immediately fetched some books and a shirt for the occasion.</p>
<p><img src="https://blog.cdemi.io/content/images/2018/03/Image-uploaded-from-iOS-min.jpg" alt="Meeting Woz" loading="lazy"></p>
<h2 id="whoisstevewozniak">Who is Steve Wozniak?</h2>
<p>A Silicon Valley icon and philanthropist for the past four decades, Steve Wozniak has helped shape the computing industry with his design of Apple&apos;s first line of products the Apple I and II. He also influenced the popular Macintosh. There are a lot of scientists, product engineers, and hardware developers who have made a significant contribution to the growth of the technology industry. However, Stephen Gary Wozniak has left his <em>competitors</em> behind. One can say without exaggeration that thanks to his genius, the tech industry has reached new heights.</p>
<h3 id="ayoungcomputergeniuswhowasanunwelcomepersoninuniversities">A young computer genius who was an unwelcome person in universities</h3>
<p>Steve Wozniak was born almost 70 years ago in sunny California. Being the son of an engineer, he learnt the ropes of electronics at an early age and fell in love with it. It is interesting to note that <a href="https://www.cnbc.com/2016/04/21/steve-wozniak-school-is-not-enough-go-beyond-it.html">the University of Colorado Boulder did not want to see first-year student Steve Wozniak within its walls after the young genius had hacked into the institution&apos;s computer system</a>.</p>
<p>The future great scientist made a second attempt to earn an undergraduate degree and entered the University of California. Although Wozniak was never a star student, he was building working electronics from scratch during his university days. The world&apos;s first computer known as the &quot;<a href="https://emberify.com/blog/cream-soda-the-first-computer/">Cream Soda</a>&quot;, was one of those Stephen&apos;s self-taught projects.</p>
<p>Despite the fact that Wozniak did not get an A+ for any of his academic papers, his university days yielded fruits; he started his brilliant career at that time. Wozniak&apos;s rising to the highest pinnacle of fame began in 1971, when the future worldwide famous hardware developer was introduced to a senior high school student <a href="https://en.wikipedia.org/wiki/Steve_Jobs">Steve Jobs</a>. They soon became friends and started working together for Hewlett Packard Enterprise Company. Since Steve Wozniak did not see any point in continuing his studying at the University of California, the young man often missed classes and was expelled as a result of his poor academic performance.</p>
<h3 id="thebirthoftheapplei">The Birth of the Apple I</h3>
<p>Meanwhile, the IT industry witnessed the invention of a microprocessor. The world of electronics was moving on and the demand for PCs was rising. Interestingly, <a href="https://en.wikipedia.org/wiki/Apple_I">Apple I</a> &quot;owes its existence&quot; to Steve Wozniak&apos;s financial pressure. The computer engineer <strong>could not afford himself to buy a PC and that encouraged him to invent one</strong> in 1976. That was the birth of the Apple I.</p>
<blockquote>
<p>&quot;My goal wasn&apos;t to make a ton of money. It was to build great computers&quot; - <strong>Steve Wozniak</strong></p>
</blockquote>
<p>It&apos;s worth emphasizing that the computer genius designed all components of his invention single-handedly, including the hardware, circuit board designs, and OS. Wozniak&apos;s computer was of better quality compared to its competitor, the Altair, and performed more complex tasks. The Apple I left mark in the history of computing as the first home PC, which could display characters on screen.</p>
<p>Wozniak showed Steve Jobs his <em>darling</em>, who saw striking potential in his friend&apos;s invention. That was the beginning of the Apple&apos;s epoch. The two computer geniuses started <a href="https://en.wikipedia.org/wiki/Apple_Inc.">Apple Computer Inc.</a> in late 1970&apos;s.</p>
<p>Stephen Wozniak left Hewlett Packard and headed the research and development unit of his own Company. Steve Jobs hit the white. Soon the Apple I became the best-selling PC in the world. Apple Computer, Inc. was growing and its founders were selling not only Wozniak&apos;s &quot;darling&quot; but also PCBs, monitors, and computer games.</p>
<h3 id="thebirthoftheappleii">The Birth of the Apple II</h3>
<p>The success of the Apple I encouraged Woz not to rest on his oars. Significantly, there was another thing that urged on one of the Apple&apos;s co-founders to polish up his device. The <a href="https://en.wikipedia.org/wiki/Altair_8800">Altair 8800</a>, which was the chief competitor of the Apple I, had provision for an expansion card and provided its users with the opportunity to program in BASIC languages.</p>
<p><img src="https://blog.cdemi.io/content/images/2018/03/635642825377857562-min.jpg" alt="Meeting Woz" loading="lazy"></p>
<p>Thanks to Woz&apos;s hard work and genius, the second generation of Apple computers successfully entered the market in 1977. The Apple II outclassed the Altair 8800. Moreover, the device took technology industry to a new level. It is of interest to note that the popularity of Jobs and Wozniak&apos;s inventions rocketed sky-high. <strong>In 1980, the company&apos;s total value was already $117 million</strong>.</p>
<p><img src="https://blog.cdemi.io/content/images/2018/03/IMG_20180306_163016.jpg" alt="Meeting Woz" loading="lazy"></p>
<h3 id="amanofmanytalents">A man of many talents</h3>
<p>In 1987, Stephen Wozniak left Apple, however, the computer engineer is still an individual shareholder in Apple Inc. till date. When Apple and Woz had gone their separate ways, the inventor of the &quot;Cream Soda Computer&quot; started a new business venture. His company introduced the first-ever universal remote control into the market.</p>
<p>As mentioned above, Stephen Wozniak has never been ready to rest. Setting himself the goal of creating wireless GPS, the legendary engineer founded another company called WOZ in 2001. Five years later, he devoted his talent to acquiring technology companies with the purpose of developing them.</p>
<blockquote>
<p>&quot;Happiness = Smiles - Frowns&quot; - <strong>Steve Wozniak</strong></p>
</blockquote>
<p>Speaking about the life and career of Steve Wozniak, it is impossible not to mention that the co-founder of Apple Computer, Inc. is a man of many talents. He is not only the inventor of the Apple I and Apple II computers but he is also a gifted education teacher. Combining his work on contribution to the growth of the U.S IT industry with a tutoring elementary school students, Steve Wozniak imparted his knowledge and skills to the younger generation. The computer wizard enjoyed helping his pupils to achieve their learning objectives.</p>
<h2 id="talkingtostevewozniak">Talking to Steve Wozniak</h2>
<p>Today, Wozniak is an influence in his field. Both engineers and global business leaders consider his opinion. So you can imagine my joy, when GiG offered me the opportunity to attend a small private <em>Meet &amp; Greet</em> with Steve Wozniak in the Executive Lounge at the Intercontinental Hotel where Woz signed GiG&apos;s Apple II.</p>
<p>After the Meet &amp; Greet, we went down to Main Arena, where <a href="https://www.linkedin.com/in/robin-eirik-reed">Robin</a> led the interview. Of course, Woz preferred to come on his Segway :)</p>
<center><iframe src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2FGamingInnovationGroup%2Fvideos%2F908685185976225%2F&amp;show_text=0&amp;width=476" width="300" height="300" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowtransparency="true" allowfullscreen="true"></iframe></center>
<p>Steve <strong>reminisced in memories of what it was like to invent the Apple I, Apple II and start a company with Steve Jobs</strong>. I though it was quite hilarious how he wanted to make sure that the people understood the difference between the real Steve Wozniak versus the one that&apos;s usually portrayed in the movies.</p>
<p><img src="https://blog.cdemi.io/content/images/2018/03/IMG_20180306_172219.jpg" alt="Meeting Woz" loading="lazy"></p>
<p>Wozniak also remarked on the fact that <strong>he believes in Blockchain technology</strong>. It seems he doesn&apos;t HODL any coins (except 1 BTC) but <strong>he really approves of Ethereum</strong> in how it is a platform and not an actual currency. On the other hand, he is really <strong>not impressed by the huge number of ICOs</strong> around; who blames him?</p>
<p>In the meantime, questions were already coming in from Twitter on <a href="https://twitter.com/hashtag/WozMalta">#WozMalta</a> but I was very eager to ask my own!</p>
<p><img src="https://blog.cdemi.io/content/images/2018/03/20180306_173541.jpg" alt="Meeting Woz" loading="lazy"></p>
<p>Soon enough, I got my chance to ask Steve Wozniak <strong>how he feels about Governments intruding on open technologies such as the Internet (Net Neutrality) and Law Enforcement backdoors to devices</strong> (such as <a href="https://en.wikipedia.org/wiki/FBI%E2%80%93Apple_encryption_dispute">the year old Cupertino case</a>). I really appreciated how clear he was in his response; he is <strong>simply in favor of Net Neutrality and fully committed to User Data Privacy</strong>. On the other hand he doesn&apos;t like to meddle in politics, so he prefers not to vote. A man after my own heart!</p>
<p>Of course, I had some other questions that I submitted on Twitter:<br>
<center><a class="twitter-timeline" href="https://twitter.com/search?q=%23WozMalta%20%23AskWoz%20from%3Achridemi" data-widget-id="971111099130171394">Tweets about #WozMalta #AskWoz from:chridemi</a></center></p>
<p>Finally, I managed to get him to sign my <a href="https://smile.amazon.co.uk/gp/product/0393061434?ref_=tmm_hrd_swatch_0&amp;qid=1520359788&amp;sr=1-1&amp;pldnSite=1">iWoz Book</a> and get some (rather shaky) photos with him :)</p>
<p><img src="https://blog.cdemi.io/content/images/2018/03/IMG_20180306_180622.jpg" alt="Meeting Woz" loading="lazy"></p>
<p><img src="https://blog.cdemi.io/content/images/2018/03/IMG_20180306_180343.jpg" alt="Meeting Woz" loading="lazy"></p>
<p><img src="https://blog.cdemi.io/content/images/2018/03/IMG_20180306_181302.jpg" alt="Meeting Woz" loading="lazy"></p>
<p>Anyways, all in all I am really grateful to <a href="https://www.gig.com/">GiG</a> for this wonderful opportunity of a lifetime. I got to meet one of my role models, talk to him and have him sign my books and my shirt. <strong>Today was a good day :)</strong></p>
<p>Oh, and by the way, <a href="https://www.gig.com/gig-careers/"><strong>we are always recruiting</strong></a>!</p>
<blockquote>
<p>&quot;Be a builder, and have fun in the process&quot; - <strong>Steve Wozniak</strong></p>
</blockquote>
<!--kg-card-end: markdown-->]]></content:encoded></item></channel></rss>