<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>security on Much Ado About IT</title><link>https://it.knightnet.org.uk/tags/security/</link><description>
Recent content about security from Much Ado About IT |
Ramblings and rantings from IT Architect &amp; Designer, Julian Knight</description><generator>Hugo | gohugo.io | Theme twenty-sixteen</generator><language>en-gb</language><copyright>This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</copyright><lastBuildDate>Mon, 24 Apr 2023 21:27:28 +0000</lastBuildDate><atom:link href="https://it.knightnet.org.uk/tags/security/feed.xml" rel="self" type="application/rss+xml"/><item><title>Use an Authenticator App to Login to PayPal</title><link>https://it.knightnet.org.uk/blog/use-an-authenticator-app-to-login-to-paypal/</link><guid isPermaLink="true">https://it.knightnet.org.uk/blog/use-an-authenticator-app-to-login-to-paypal/</guid><pubDate>Sun, 11 Nov 2018 16:52:21 +0000</pubDate><guid>https://it.knightnet.org.uk/blog/use-an-authenticator-app-to-login-to-paypal/</guid><description><div>PayPal seem to think that SMS text messages are a secure two-factor authentication method.
Sadly, they are greatly mistaken. This article explains why and what to do about it.</div><div>&lt;h2 id="history">History&lt;/h2>
&lt;p>PayPal were early adopters of two factor authentication at a time when there was significant distrust in them
as an organisation. Depending on what country you were in, you could get one of their own hardware tokens or use a
Symantec VIP security token. &lt;em>Neither of these hardware tokens are available any more&lt;/em>.&lt;/p>
&lt;p>However, they never did adopt what the rest of the world started doing. Using &amp;ldquo;soft&amp;rdquo; tokens from a standard authenticator
app on smartphones. Examples of these apps are: LastPass Authenticator, Authy, Microsoft Authenticator and Google Authenticator.&lt;/p>
&lt;p>Instead, they adopted the use of SMS text messages - which were also adopted by many others due to the fact that most people were, by
then, carrying mobile phones of some sort.&lt;/p>
&lt;h2 id="the-problem">The Problem&lt;/h2>
&lt;p>Unfortunately, over the years since then, the weaknesses of SMS have been discovered. Not only can SMS text messages be intercepted
relatively easily (a problem particularly in the USA) but there is now an epidemic of phone account hijacking. Phone account hijacking
is where an attacker gets enough information about you that they can pretend to be you and then go on to be able to persuade your mobile
phone service provider that you need a replacement SIM card. Once they have a new SIM, they hijack your account and go about changing
passwords to key systems such as PayPal, Email, etc. If the second-factor for those systems uses your phone then they hijack those
accounts as well.&lt;/p>
&lt;p>These are really well-known issues and it is appalling that PayPal haven&amp;rsquo;t allowed people to use authenticator apps for two-factor
authentication as these are a lot more secure. Especially since you can backup the authenticator details and use them on another
phone in the case that yours is lost, stolen or broken. That way, you can keep control of your important accounts.&lt;/p>
&lt;p>So, when you go onto PayPal and try to activate two-factor authentication, they try to force you to register a phone.
Once registered, that phone will receive SMS text messages when you try to log in. You can also have PayPal phone you
and you get some backup manual codes that you can type in instead. Using those alternatives isn&amp;rsquo;t especially obvious.&lt;/p>
&lt;p>&lt;strong>Please help everyone by complaining to PayPal directly and on social media so that they understand that customers no longer find this behaviour acceptable.&lt;/strong>&lt;/p>
&lt;h2 id="a-solution">A Solution?&lt;/h2>
&lt;p>In fact, though, PayPal&amp;rsquo;s alternative token registration &lt;strong>does&lt;/strong> still exist on their website (at least for now).&lt;/p>
&lt;p>It is just *&lt;em>really&lt;/em> hard to get to.&lt;/p>
&lt;p>It is called &lt;a href="https://www.paypal.com/cgi-bin/webscr?cmd=_activate-security-key-any">Activate your PayPal Security Key&lt;/a>.&lt;/p>
&lt;p>But how do we get a mobile app that will generate the right codes to go with this page?&lt;/p>
&lt;h2 id="solution-1---the-symantec-vip-app">Solution 1 - the Symantec VIP app&lt;/h2>
&lt;p>The old Symantec VIP access tokens are long gone. However, they did replace it with a mobile app.&lt;/p>
&lt;p>You can download the app from your phone&amp;rsquo;s app store. It will show you a &amp;ldquo;Credential ID&amp;rdquo; that you will use to plug into
the &amp;ldquo;Serial number&amp;rdquo; field on the &lt;a href="https://www.paypal.com/cgi-bin/webscr?cmd=_activate-security-key-any">Activate your PayPal Security Key&lt;/a> page.&lt;/p>
&lt;p>Then you also provide the Security Code from the app that is currently showing, wait for the next code to show and enter that as well.&lt;/p>
&lt;p>Great! Pretty simple when you know how!&lt;/p>
&lt;p>There is, however, a little problem. There doesn&amp;rsquo;t appear to be any way to back up that configuration in case your phone is lost, broken or stolen. It would be FAR better if we could use on of the more standard authenticator apps such as those listed above.&lt;/p>
&lt;h2 id="solution-2---using-a-standard-authenticator-app">Solution 2 - Using a Standard Authenticator App&lt;/h2>
&lt;p>So, it turns out that we &lt;em>can&lt;/em> use a standard authenticator app. But it is certainly pretty painful to do it. The advantage is that
some of the better authenticator apps such as LastPass Authenticator and Authy provide the ability to back up your accounts.&lt;/p>
&lt;p>Here is a work around that will let you use a standard authenticator app with PayPal. It is involved and clunky but
it does - currently at least - work. You will need some minimal knowledge of using a command line.&lt;/p>
&lt;p>We will use a set of scripts called &lt;a href="https://github.com/dlenski/python-vipaccess">&lt;code>python-vipaccess&lt;/code>&lt;/a>. This will let us pretend to be a Symantec VIP hardware token. There are several versions of this application but only one seems to be maintained, the version by &lt;a href="https://github.com/dlenski">Dan Lenski&lt;/a>.&lt;/p>
&lt;p>In order to use this work around, you will need a computer that can run &lt;a href="https://en.wikipedia.org/wiki/Python_(programming_language)">Python&lt;/a>.
So the first step is to install it. You will need &lt;a href="https://www.python.org/downloads/">v3.x of Python&lt;/a>. How you install this will
depend on your operating system. The following instructions have been tested on Linux on a Raspberry Pi. You may need to tweak things
on other OS&amp;rsquo;s such as Windows.&lt;/p>
&lt;p>You will also need the Python 3 version of something called &lt;a href="https://pip.pypa.io/en/stable/installing/">pip&lt;/a>. If using Linux,
you should install pip via your package manager. The examples below use Rasbian which is derived from Debian Linux. The package
manager for Debian is &lt;code>apt&lt;/code> or &lt;code>apt-get&lt;/code>.&lt;/p>
&lt;p>Finally, the following also assumes that you have an application called &lt;a href="https://git-scm.com/">&lt;code>git&lt;/code>&lt;/a> installed. If you don&amp;rsquo;t have and don&amp;rsquo;t want
to install that, you can manually download the required &lt;code>python-vipaccess&lt;/code> application archive from &lt;a href="https://github.com/dlenski/python-vipaccess/releases">GitHub&lt;/a> directly &amp;amp; unpack the archive. We will assume that you are starting on the command line from the folder immediately above the place you&amp;rsquo;ve unpacked the application (the &lt;code>git clone&lt;/code> command does the equivalent).&lt;/p>
&lt;ol>
&lt;li>Install the Python 3 version of pip if needed: &lt;code>sudo apt install python3-pip&lt;/code>&lt;/li>
&lt;li>Download an application from GitHub. &lt;code>git clone https://github.com/dlenski/python-vipaccess.git&lt;/code>&lt;/li>
&lt;li>&lt;code>cd python-vipaccess&lt;/code>&lt;/li>
&lt;li>&lt;code>pip3 install -r requirements.txt&lt;/code> (takes quite a while on a Pi3. Not entirely sure you need this step or whether the next step does the same thing)&lt;/li>
&lt;li>&lt;code>pip3 install .&lt;/code>&lt;/li>
&lt;/ol>
&lt;p>The next problem is that this method of installation does &lt;strong>not&lt;/strong> create an executable!&lt;/p>
&lt;p>You have to execute using the following command:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">python3 ./vipaccess/cli.py provision -p
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Next, open your favoured OTP/Authenticator tool (I prefer LastPass Authenticator). Add a new account using a barcode. Now run the command:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">qrencode -t ANSI256 &lt;span class="s1">&amp;#39;ZZZ&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Where &lt;code>ZZZ&lt;/code> is the long URI output by the provisioning command and looks something like &lt;code>otpauth://totp/VIP%20Access:XXXXXXXXXXXX?issuer=Symantec&amp;amp;algorithm=SHA1&amp;amp;digits=6&amp;amp;period=30&amp;amp;secret=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY&lt;/code>. Don&amp;rsquo;t forget to add the wrapping single quotes.&lt;/p>
&lt;p>&lt;code>XXXXXXXXXXXX&lt;/code> being the &lt;em>credential&lt;/em> from the provisioning command and &lt;code>YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY&lt;/code> being the long code you would also use with &lt;code>oathtool&lt;/code>. The whole &lt;code>otpauth&lt;/code> URI is given to you so you can simply copy and paste it between the single quotes in the &lt;code>qrencode&lt;/code> command.&lt;/p>
&lt;p>This generates a visual, 2D barcode in your terminal that you can use in your authenticator app to finish creating the new account. The account will be named &amp;ldquo;Symantec&amp;rdquo; by default.&lt;/p>
&lt;p>Now go to &lt;a href="https://www.paypal.com/cgi-bin/webscr?cmd=_activate-security-key-any">https://www.paypal.com/cgi-bin/webscr?cmd=_activate-security-key-any&lt;/a>&lt;/p>
&lt;p>In the resulting form, &amp;ldquo;Serial Number&amp;rdquo; is the &lt;code>XXXXXXXXXXXX&lt;/code> value. Then you have to enter &lt;strong>two&lt;/strong> security codes from your authenticator app. Enter the code that is currently showing. Then wait 30 sec for the next code to show and enter that.&lt;/p>
&lt;p>All being well, you should now have a new activated security key. The key should last for 3 years after which you can create a new one following the same process.&lt;/p></div></description><author>Julian Knight</author><category domain="https://it.knightnet.org.uk/categories/security">Security</category><category domain="https://it.knightnet.org.uk/tags/paypal">PayPal</category><category domain="https://it.knightnet.org.uk/tags/finance">Finance</category><category domain="https://it.knightnet.org.uk/tags/security">Security</category></item><item><title>How to create secure certificates</title><link>https://it.knightnet.org.uk/kb/nr-qa/https-valid-certificates/</link><guid isPermaLink="true">https://it.knightnet.org.uk/kb/nr-qa/https-valid-certificates/</guid><pubDate>Sun, 14 Oct 2018 15:54:20 +0000</pubDate><guid>https://it.knightnet.org.uk/kb/nr-qa/https-valid-certificates/</guid><description><div>Generate certificates for Node-RED that are trusted by all modern browsers. This will let you access Node-RED (and other services) over an encrypted HTTPS link.</div><div>&lt;p>&lt;strong>THIS ARTICLE IS CURRENTLY IN DRAFT - it is still being developed. Please feel free to add constructive comments and corrections below.&lt;/strong>&lt;/p>
&lt;h2 id="the-problem">The problem&lt;/h2>
&lt;p>Argh! Why is it so hard to create and manage trusted certificates for &amp;ldquo;internal&amp;rdquo; services!
While you can create your own &amp;ldquo;self-signed&amp;rdquo; certificates, all modern browsers now mark these as insecure and try
to stop you from accessing them. This is wrong. Browsers should allow access to self-signed certificates if they
point to a non-routable IP address (192.168.&lt;em>.&lt;/em> or 10.&lt;em>.&lt;/em>.* for example) or an invalid root domain such as &lt;code>*.something.local&lt;/code>.&lt;/p>
&lt;p>Also, we really probably don&amp;rsquo;t want to expose all of our internal servers to the bad, wide Internet - this is generally a really
bad idea unless you are good at securing things &lt;strong>and&lt;/strong> have the time to keep making sure they stay secure as things update.&lt;/p>
&lt;h2 id="possible-fixes">Possible fixes&lt;/h2>
&lt;p>You could manually add a new (self-signed) root certificate to all devices needing access to your internal services so that your self-signed certificates are trusted - try getting that past the rest of the family!&lt;/p>
&lt;p>The only other alternative is to use a trusted CA. Since I&amp;rsquo;m assuming you are doing this for testing or for use at home,
I also assume that you don&amp;rsquo;t want to spend lots of money. Trusted certificates usually cost - a lot! Often US$100 per year or more.&lt;/p>
&lt;p>However, there is one supplier that issues free trusted certificates. &lt;a href="https://letsencrypt.org">Let&amp;rsquo;s Encrypt&lt;/a>. This is a great service for a great price. But it comes with some overheads.&lt;/p>
&lt;h2 id="its-never-simple">It&amp;rsquo;s never simple&lt;/h2>
&lt;p>OK, so assuming we want to use Let&amp;rsquo;s Encrypt (LE), what issues do we now need to overcome?&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Firstly, we &lt;strong>have&lt;/strong> to have a publicly known domain address. You cannot issue a publicly trusted certificate to an IP address
or non-routable domain name.&lt;/p>
&lt;p>Note that certificates are generally issued to specific domain names so that &lt;code>www.thing.com&lt;/code> and &lt;code>thing.com&lt;/code> are different names. We don&amp;rsquo;t want to mess with all of that all the time, especially if we are doing lots of tests. So we can now use a &amp;ldquo;wildcard&amp;rdquo; certificate for &lt;code>*.thing.com&lt;/code>&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Next, we have to have a way for the Let&amp;rsquo;s Encrypt servers to verify that our domain name is actually ours to do something with.&lt;/p>
&lt;p>By default, the LE service wants to have access back to our server in order to verify that it is ours.
This would bring us back to the issue of exposing our server to the Internet, something that we prefer not
to do unless we really have to.&lt;/p>
&lt;p>Thankfully LE now has an alternative called &lt;code>DNS-01&lt;/code>. Unfortunately, this requires our DNS (Domain Name Service) to support
a particular type of secure API. For that we can use Cloudflare or any of the other DNS services listed on the LE website.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Finally, we have to renew the certificate every 3 months since that is all that Let&amp;rsquo;s Encrypt allows us to keep a certificate for. This is a pain but it does have some security benefits.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;p>Let&amp;rsquo;s look at the details of how to do this.&lt;/p>
&lt;h2 id="1-get-a-domain">1. Get a domain&lt;/h2>
&lt;p>We need a domain and we need it to be one that we can, at least to some degree, control. So some of the free &amp;ldquo;dynamic DNS&amp;rdquo; services probably won&amp;rsquo;t cut it. However, we can get our very own domain for a few £/$ per year so go ahead and do that. Save yourself some pain in the next bit by using Cloudflare themselves to register your domain.&lt;/p>
&lt;p>Once we have a domain, we need to let it be managed by a DNS that supports the &lt;code>DNS-01&lt;/code> verification API. You might be lucky in that your domain registrar already supports that. In most cases, they won&amp;rsquo;t. So now you have to hand over control of the DNS settings to someone
like &lt;a href="https://cloudflare.com/">Cloudflare&lt;/a> who&amp;rsquo;s free service is plenty for what we need. Your domain registrar will tell you how to
change the name servers that control your domain. Don&amp;rsquo;t worry, your registrar remains the overall controller so renewals are not an issue.&lt;/p>
&lt;p>As we will be using a wildcard certificate, we don&amp;rsquo;t need to worry about setting up specific names at this point.&lt;/p>
&lt;p>Also, as we will be using DNS-01 verification, we don&amp;rsquo;t need to point anything at our public IP address. Use the DNS settings to point the default &amp;ldquo;A&amp;rdquo; DNS entry at a dummy IP address like &lt;code>10.10.10.10&lt;/code>. That&amp;rsquo;s fine and it means that we won&amp;rsquo;t be leaking any information about our private network.&lt;/p>
&lt;h2 id="2a-install-a-client-for-lets-encrypt">2a. Install a client for Let&amp;rsquo;s Encrypt&lt;/h2>
&lt;p>There are lots of clients for LE, see the list on their website. For this post, I&amp;rsquo;m going to use a Raspberry Pi as I have one running permanently controlling my home automation system. You could also use a NAS or any PC. Even some routers such as the ever excellent &lt;a href="https://www.ubnt.com/edgemax/edgerouter-lite/">Ubiquity EdgeRouter Lite&lt;/a> &lt;a href="https://github.com/hungnguyenm/edgemax-acme">can be used&lt;/a>.&lt;/p>
&lt;p>I am going to use a 3rd-party BASH (Linux command-line) script as this is a lot simpler than the official Python based script.&lt;/p>
&lt;p>From your Pi, follow the &lt;a href="https://github.com/Neilpang/acme.sh#1-install-online">instructions to install the script&lt;/a>. Start a remote command line using an SSH client from a convenient computer. Log in using an ID that is allowed to do administration on the Pi. Then install the script using &lt;code>curl https://get.acme.sh | sh&lt;/code>. Note that I didn&amp;rsquo;t bother to become root as I need to use the certificate with a Node.JS service that isn&amp;rsquo;t run globally as root (this is best practice, don&amp;rsquo;t run things as root as that opens up additional security issues). I also ran &lt;code>alias acme.sh=~/.acme.sh/acme.sh&lt;/code> manually rather than logging out and back in again to pick up the defined alias.&lt;/p>
&lt;h2 id="2b-get-the-cloudflare-api-details">2b. Get the Cloudflare API details&lt;/h2>
&lt;p>So, we&amp;rsquo;re ready now right? Not quite. First we need somewhere to actually run the client tool that will initially get our first certificate and that will then run periodically to renew the certificate.&lt;/p>
&lt;p>As we are using DNS-01 validation with Cloudflare, we need the API access details. Jump ahead in the &lt;code>acme.sh&lt;/code> instructions to the part on &lt;a href="https://github.com/Neilpang/acme.sh#7-automatic-dns-api-integration">DNS API integration&lt;/a> since that&amp;rsquo;s what we need in order to avoid exposing our internal servers to the Internet. We need a configuration file. The &lt;a href="https://github.com/Neilpang/acme.sh/tree/master/dnsapi#how-to-use-dns-api">instructions are in the the &lt;code>dnsapi&lt;/code> folder&lt;/a>.&lt;/p>
&lt;p>Log into your Cloudflare account, go to &amp;ldquo;My Profile&amp;rdquo; under the little person icon top-right. Pick up your verified email address then scroll down to the bottom &amp;ldquo;API Keys&amp;rdquo; &amp;amp; click on &amp;ldquo;View&amp;rdquo; against the &amp;ldquo;Global API Key&amp;rdquo;. While you are there, turn on 2-factor authentication to protect your account and services. &lt;strong>Keep this information safe! If someone gets hold of it, they can change your DNS and other settings.&lt;/strong>&lt;/p>
&lt;p>Issue the commands &lt;code>export CF_Key=&amp;quot;sdfsdfsdfljlbjkljlkjsdfoiwje&amp;quot; &amp;amp;&amp;amp; export CF_Email=&amp;quot;xxxx@sss.com&amp;quot;&lt;/code> which temporarily puts the security information into environment variables.&lt;/p>
&lt;h2 id="2c-get-our-first-certificate">2c. Get our first certificate&lt;/h2>
&lt;p>Now we are ready to try and get our first certificate. Run the following from your SSH command line:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">acme.sh --issue --dns dns_cf -d example.com -d *.example.com
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Obviously replacing the domain names with your own. The entry that starts with &lt;code>*&lt;/code> gives you a wildcard certificate so that you
can use this certificate with any sub-domain like &lt;code>www.example.com&lt;/code> or &lt;code>fred.example.com&lt;/code>.&lt;/p>
&lt;h2 id="3-certificate-renewals">3. Certificate renewals&lt;/h2>
&lt;p>As mentioned, LE certificates expire every 90 days. Thankfully, the script we just ran not only does gets us our first certificate, it &lt;a href="https://github.com/Neilpang/acme.sh#11-how-to-renew-the-certs">sets up a script to renew the certificate every 60 days&lt;/a> - giving some extra time for the occasional renewal failures. You can adjust the renewal in the configuration file if you really want to. You don&amp;rsquo;t have to worry about restarting this if your device reboots.&lt;/p>
&lt;p>Once the script has run for the first time, go ahead and &lt;a href="https://github.com/Neilpang/acme.sh#13-how-to-upgrade-acmesh">run the following so that the script itself auto-updates&lt;/a>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">acme.sh --upgrade --auto-upgrade
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="using-names-instead-of-ip-addresses">Using names instead of IP addresses&lt;/h2>
&lt;p>New we have a certificate that we can use for any service simply by referencing that service by name.&lt;/p>
&lt;p>Note, though, that you can no longer reference your services by IP address.&lt;/p>
&lt;p>For example &lt;code>pi.example.com&lt;/code> but not &lt;code>192.168.1.20&lt;/code>.&lt;/p>
&lt;p>Using an IP address will throw an error in modern browsers.&lt;/p>
&lt;p>So a slight wrinkle in our effort to get rid of browser errors since, most home servers are access via an IP address not a name. How do we fix that? We have a couple of options.&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Use your router&amp;rsquo;s DHCP or DNS service to define names for local services.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Install a DNS service on a local device.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Update the &lt;code>hosts&lt;/code> file on every client device.&lt;/p>
&lt;p>This may work if you only have one or two laptops and nothing else but even then it is clunky. With mobile devices, it won&amp;rsquo;t be possible anyway.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;p>Both 1 and 2 will require some configuration. What we are doing is creating names that point to local IP addresses. How you do this, depends on the router or DNS server you have.&lt;/p>
&lt;p>In either case, we really want a &lt;em>fixed&lt;/em> IP address to work with so that our Pi (or other device running our services) is always at the same address. All routers should have the ability to do this so look for the &lt;code>DHCP&lt;/code> settings. You will need to know the MAC address of the device, it looks something like &lt;code>b8:27:eb:df:49:7e&lt;/code> (you may see it with upper case letters and/or without the colons). The router&amp;rsquo;s DHCP pages will have a list of active &amp;ldquo;leases&amp;rdquo; that will show that information. You use that address, which is defined by a network interface on a device, to issue a fixed IP address via the DHCP service. Make sure that your fixed addresses don&amp;rsquo;t overlap with the range defined for DHCP to issue dynamically.&lt;/p>
&lt;p>Sometimes, your DHCP server will let you define a name to go with this configuration. That&amp;rsquo;s great because you can now specify the name to include the domain that the certificate is issued to. e.g. &lt;code>pi.example.com&lt;/code>.&lt;/p>
&lt;p>The Ubiquiti EdgeRouter&amp;rsquo;s will let you define names manually using a Wizard called &amp;ldquo;&lt;a href="https://192.168.1.1/#Wizard/feature/DNS_host_names">DNS Host Names&lt;/a>&amp;rdquo;. Some other routers may give you access to the router&amp;rsquo;s &lt;code>hosts&lt;/code> file.&lt;/p>
&lt;p>If you can&amp;rsquo;t do that on your router, you will need a DNS server that will let you define names to IP addresses. That&amp;rsquo;s a bit more complex and beyond the scope of this, already rather long, blog post I&amp;rsquo;m afraid.&lt;/p>
&lt;h2 id="using-your-certificate">Using your certificate&lt;/h2>
&lt;p>Now you have the certificate and can access your servers via names instead of IP addresses so you are ready - finally - to configure the services to use the certificates.&lt;/p>
&lt;p>You can configure most TCP/IP based services to use TLS (Transport Layer Security) which is what we will mostly want our certificate for. Most people will be familiar with accessing web pages over HTTPS which is TLS applied to HTTP. But we can also use the certificate to secure communications for file transfers (FTPS or SFTP), Email (SMTPS, IMAPS, etc.).&lt;/p>
&lt;h3 id="node-red">Node-RED&lt;/h3>
&lt;p>Node-RED is a service built over NodeJS and ExpressJS. It creates a web server that we can secure using our certificate. The same certificate will also be used to help to secure websocket communications.&lt;/p>
&lt;p>Once you&amp;rsquo;ve changed the settings below, remember to access Node-RED using the server name instead of the IP address. You will need to restart the Node-RED service.&lt;/p>
&lt;h4 id="settingsjs">settings.js&lt;/h4>
&lt;p>This file is where we configure Node-RED to use HTTPS. Note that the settings are the same as those from NodeJS so you can check out any other settings in the NodeJS documentation.&lt;/p>
&lt;p>The &lt;code>settings.js&lt;/code> file is found in your &lt;code>userDir&lt;/code> folder which is generally &lt;code>~/.node-red&lt;/code> if installed according to the instructions on the Node-RED website. &lt;code>~&lt;/code> is the &amp;ldquo;home&amp;rdquo; folder for the user ID running the Node-RED service.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-javascript" data-lang="javascript">&lt;span class="line">&lt;span class="cl">&lt;span class="p">...&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="nx">module&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="nx">exports&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">...&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="kr">const&lt;/span> &lt;span class="nx">path&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="nx">require&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s1">&amp;#39;path&amp;#39;&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="kr">const&lt;/span> &lt;span class="nx">fs&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="nx">require&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s1">&amp;#39;fs&amp;#39;&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">...&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nx">https&lt;/span>&lt;span class="o">:&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c1">// Don&amp;#39;t forget to adjust the paths below
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="c1">// according to your installation
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="nx">key&lt;/span>&lt;span class="o">:&lt;/span> &lt;span class="nx">fs&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="nx">readFileSync&lt;/span>&lt;span class="p">(&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nx">path&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="nx">join&lt;/span>&lt;span class="p">(&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s1">&amp;#39;..&amp;#39;&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="s1">&amp;#39;.acme.sh&amp;#39;&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="s1">&amp;#39;&amp;lt;server_name&amp;gt;&amp;#39;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="s1">&amp;#39;&amp;lt;server_name&amp;gt;.key&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">),&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nx">cert&lt;/span>&lt;span class="o">:&lt;/span> &lt;span class="nx">fs&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="nx">readFileSync&lt;/span>&lt;span class="p">(&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nx">path&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="nx">join&lt;/span>&lt;span class="p">(&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="s1">&amp;#39;..&amp;#39;&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="s1">&amp;#39;.acme.sh&amp;#39;&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="s1">&amp;#39;&amp;lt;server_name&amp;gt;&amp;#39;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="s1">&amp;#39;fullchain.cer&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">),&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">},&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">...&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Where &lt;code>&amp;lt;server_name&amp;gt;&lt;/code> is something like &lt;code>pi2.example.com&lt;/code> - whatever you have defined as the name associated with the IP address.&lt;/p>
&lt;h3 id="mqtt-broker-mosquitto">MQTT broker Mosquitto&lt;/h3>
&lt;blockquote>
&lt;p>NOTE: This section is not complete as I&amp;rsquo;ve not managed to get this working as yet.&lt;/p>
&lt;/blockquote>
&lt;p>Many IoT systems make use of MQTT for publish and subscribe handling of data from devices. The more we embed IoT into our lives, the more important it is to secure the MQTT brokers. By enabling encrypted communications via TLS and then configuring user ID&amp;rsquo;s and strong passcodes between devices and the broker, we can help make things a lot more secure.&lt;/p>
&lt;p>Mosquitto is one of the most common MQTT brokers due to its small size and high performance.&lt;/p>
&lt;p>On a Linux system, Mosquitto configuration files are found in &lt;code>/etc/mosquitto&lt;/code>. Try not to edit &lt;code>/etc/mosquitto/mosquitto.conf&lt;/code>, instead add your own file to &lt;code>/etc/mosquitto/conf.d&lt;/code>. It will be loaded automatically and will not be overridden when Mosquitto is upgraded.&lt;/p>
&lt;h4 id="etcmosquittoconfdcustomconf">/etc/mosquitto/conf.d/custom.conf&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="webmin">Webmin&lt;/h3>
&lt;p>Webmin is a really helpful remote administration tool for Linux servers. Being web-based means that you can use your certificate with it. Replace the default certificate by going to &lt;em>Webmin &amp;gt; Webmin Configuration &amp;gt; SSL Settings&lt;/em> (https://&amp;lt;domain_name&amp;gt;:10000/webmin/edit_ssl.cgi?xnavigation=1).&lt;/p>
&lt;p>Then change the default &lt;em>Private key file&lt;/em> path with the the one generated by the &lt;code>acme.sh&lt;/code> script (it ends with &lt;code>.key&lt;/code>). Also change the &lt;em>certificate file&lt;/em> setting to be the file &lt;code>fullchain.cer&lt;/code> in the same folder.&lt;/p>
&lt;p>Now restart Webmin from the main Webmin configuration page or issue the command &lt;code>sudo systemctl restart webmin&lt;/code>.&lt;/p>
&lt;p>No more certificate errors as long as you remember to use your server name not IP address.&lt;/p>
&lt;h3 id="web-servers">Web servers&lt;/h3>
&lt;p>There are so many posts about configuring any of the regular web servers with certificates that I&amp;rsquo;m not going to repeat them here.&lt;/p>
&lt;p>Just remember that you have all the certificate and key files that you need so you only need to make the folder available (read-only) to the user ID that runs the web server. Then to configure the appropriate files.&lt;/p>
&lt;h3 id="router-ubiquiti-edgerouter">Router (Ubiquiti EdgeRouter)&lt;/h3>
&lt;p>There is a &lt;a href="https://github.com/hungnguyenm/edgemax-acme">dedicated script for EdgeOS&lt;/a> which you may wish to use for simplicity. Otherwise, you will need to remember to securely transfer the fullchain.cer and xxx.key files to the router&amp;rsquo;s filing system each time they are updated.&lt;/p>
&lt;p>You can change to custom key and certificate files using the &amp;ldquo;Config Tree&amp;rdquo; &lt;em>service / gui&lt;/em>.&lt;/p>
&lt;h3 id="influxdb-and-telegraf">InfluxDB and Telegraf&lt;/h3>
&lt;p>InfluxDB is a timeseries database that is very efficient at recording data over time. Great for sensor data. All access is, by default, over HTTP so it is possible to configure it to use HTTPS.&lt;/p>
&lt;p>Telegraf is from the same vendor as InfluxDB. It can also be configured to talk to InfluxDB over HTTPS.&lt;/p>
&lt;h3 id="grafana">Grafana&lt;/h3>
&lt;blockquote>
&lt;p>NOTE: Grafana seems to want to be able to &lt;strong>write&lt;/strong> to something - either the folder or the cert/key files - that it shouldn&amp;rsquo;t do so currently is failing. I haven&amp;rsquo;t had time to resolve this as yet.&lt;/p>
&lt;/blockquote>
&lt;p>&lt;code>/etc/grafana/grafana.ini&lt;/code>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">[server]
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"># Protocol (http, https, socket)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">protocol = https
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"># https certs &amp;amp; key file
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">cert_file = /home/pi/.acme.sh/&amp;lt;server_name&amp;gt;/fullchain.cer
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">cert_key = /home/pi/.acme.sh/&amp;lt;server_name&amp;gt;/&amp;lt;server_name&amp;gt;.key
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></div></description><author>Julian Knight</author><category domain="https://it.knightnet.org.uk/categories/development">Development</category><category domain="https://it.knightnet.org.uk/categories/it-security">it-security</category><category domain="https://it.knightnet.org.uk/tags/node-red">Node-RED</category><category domain="https://it.knightnet.org.uk/tags/security">security</category></item><item><title>How to secure Node-RED</title><link>https://it.knightnet.org.uk/kb/nr-qa/securing-node-red/</link><guid isPermaLink="true">https://it.knightnet.org.uk/kb/nr-qa/securing-node-red/</guid><pubDate>Sun, 30 Sep 2018 13:48:14 +0000</pubDate><guid>https://it.knightnet.org.uk/kb/nr-qa/securing-node-red/</guid><description><div>Node-RED is increasingly used in situations that require reasonable security. Up to now, however, the information required to secure it correctly has been fragmented. This article aims to give an end-to-end outline to enable anyone to secure their installation.</div><div>&lt;p>&lt;strong>THIS ARTICLE IS CURRENTLY IN DRAFT - it is still being developed. Please feel free to add constructive comments and corrections below.&lt;/strong>&lt;/p>
&lt;p>I am going to attempt to describe the various options and configurations that you will need to think
about in order to secure an instance of Node-RED. This is probably going to be a &lt;em>long&lt;/em> article!&lt;/p>
&lt;p>Please see my other articles &lt;em>&lt;a href="https://it.knightnet.org.uk/kb/nr-qa/node-red-internet/">Making Node-RED available over the Internet&lt;/a>&lt;/em> and &lt;em>&lt;a href="https://it.knightnet.org.uk/kb/nr-qa/telegram-bot/">Secure Home Automation Controls via a Telegram Bot&lt;/a>&lt;/em> for other ideas about the security of Node-RED in regard to use over the Internet and how to avoid having to worry about some of the issues dealt with here.&lt;/p>
&lt;h2 id="warning-and-disclaimer">Warning and disclaimer&lt;/h2>
&lt;p>This is my best view of securing Node-RED. I&amp;rsquo;ve not been a professional developer in a long time and
I am not a professional security analyst (I&amp;rsquo;m a IT technology and information security manager).&lt;/p>
&lt;p>So you must not assume that this article covers every issue. You must also not assume, even if you
follow every best practice, that an instance of Node-RED will be &amp;ldquo;Secure&amp;rdquo;. It may not be for many reasons.&lt;/p>
&lt;p>&lt;strong>Get your system and its infrastructure tested to destruction by professionals.&lt;/strong>&lt;/p>
&lt;p>Hopefully though, this article will at least let you see the issues and have a reasonable go at making
your instance of Node-RED a little more secure.&lt;/p>
&lt;h2 id="terminology">Terminology&lt;/h2>
&lt;p>A few words and phrases that will be used along with the least technical descriptions that I can come up with.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Term&lt;/th>
&lt;th>Meaning&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;a href="https://en.wikipedia.org/wiki/Encryption">Encryption&lt;/a>&lt;/td>
&lt;td>Changing human readable information into something that requires a special key before it can be understood.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;a href="https://en.wikipedia.org/wiki/Authentication">Authentication&lt;/a>&lt;/td>
&lt;td>Providing a secured identifier to a system to prove that the person accessing the system is who they &lt;em>claim&lt;/em> to be.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;a href="https://en.wikipedia.org/wiki/Authorization">Authorisation&lt;/a>&lt;/td>
&lt;td>Controlling what information a user of a system is allowed to see and what actions they are allowed to take.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;a href="https://en.wikipedia.org/wiki/Transport_Layer_Security">TLS&lt;/a>&lt;/td>
&lt;td>A defined protocol for securing connections between systems and applications. In basic use, it provides a minimum level of &lt;em>authentication&lt;/em> of a server (via a certificate chain of trust) and facilitates encrypted communications with that server.&lt;!-- raw HTML omitted -->It also has additional mechanisms that will also provide a minimum level of trust of the client application. However, this is rarely used in Internet web applications.&lt;!-- raw HTML omitted -->TLS may be used to secure many different application and system interactions, not just between a browser and a server.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;a href="https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol">HTTP&lt;/a>(&lt;a href="https://en.wikipedia.org/wiki/HTTPS">S&lt;/a>)&lt;/td>
&lt;td>The main web protocol that lets browsers get human readable information from web servers. HTTPS is HTTP secured with TLS (used to also allow a protocol called SSL but that is deprecated as insecure). Ideally, &lt;em>every&lt;/em> connection to a server from a browser should be over HTTPS since the use of &lt;a href="https://developers.google.com/web/fundamentals/security/encrypt-in-transit/why-https">HTTP allows some pretty bad things to happen&lt;/a>.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h1 id="the-basic-architecture-of-node-red">The basic architecture of Node-RED&lt;/h1>
&lt;p>To help us understand what needs to be secured, here is the basic technical architecture of Node-RED. From the outside in. This is only one way to view the architecture of course, I&amp;rsquo;ve tried to keep things as simple as possible.&lt;/p>
&lt;ol>
&lt;li>
&lt;p>&lt;em>Your flows, Dashboard and other pages served by Node-RED&lt;/em>&lt;/p>
&lt;p>This is the &amp;ldquo;code&amp;rdquo; that you (or your users/administrators) have put together.&lt;/p>
&lt;p>Node-RED is a general purpose tool and so is capable of creating web pages and various other types of connections such as websockets, TCP/UDP connections and much more.&lt;/p>
&lt;p>Anything that is created at this level either must be secured by Node-RED&amp;rsquo;s settings or by your code.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;em>The Node-RED runtime API&lt;/em>&lt;/p>
&lt;p>This is the bit of magic that makes everything work. At some point, this will be independent to the administration side but at the moment (~ v0.19) it isn&amp;rsquo;t.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;em>The Node-RED Administration user interface&lt;/em>&lt;/p>
&lt;p>This is a web application (web page plus websocket connections) that lets you build your own applications using Node-RED. It uses various 3rd-party libraries to do some of the heavy lifting (D3, JQuery, etc.)&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;em>The Node-RED core and contributed nodes&lt;/em>&lt;/p>
&lt;p>Here is all of the clever custom code, generally tucked out of the way so you don&amp;rsquo;t need to worry about it.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;em>ExpressJS&lt;/em>&lt;/p>
&lt;p>ExpressJS is a library for NodeJS that does the heavy lifting of providing a web server.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;em>NodeJS&lt;/em>&lt;/p>
&lt;p>NodeJS is a collection of JavaScript and C code that lets people build application servers across different operating systems. It lets people use JavaScript (typically a browser language) to create their server applications.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;em>Operating System&lt;/em>&lt;/p>
&lt;p>Apart from the hardware, we are now at the bottom of the architecture.&lt;/p>
&lt;p>No point in securing everything else unless you have secured things at this level.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;p>In order to secure Node-RED, we have to pay some attention to all of these layers. Thankfully, the guys to created Node-RED have thought about many of the details and made it at least somewhat easier to provide a basic level of security.&lt;/p>
&lt;h1 id="settings-that-you-need-to-think-about">Settings that you need to think about&lt;/h1>
&lt;h2 id="other-considerations">Other considerations&lt;/h2>
&lt;h3 id="nodejs-and-package-vulnerabilities">NodeJS and package vulnerabilities&lt;/h3>
&lt;p>As Node-RED itself needs to have backwards compatibility with older versions of NodeJS, it may be forced to use packages (AKA modules or libraries) that are now out-of-date. Similarly, nodes that you rely on may not get updated as regularly as needed to stay ahead of vulnerabilities.&lt;/p>
&lt;p>NodeJS itself is very rapidly changing and unless you are updating it regularly (e.g. weekly) it may also have outstanding vulnerabilities.&lt;/p>
&lt;p>To mitigate these issues, you need to:&lt;/p>
&lt;ul>
&lt;li>Update NodeJS weekly or daily in sensitive installations. You will also want a set of regression tests - test that are run after every update - if you want users to be able to rely on rapid update cycles.&lt;/li>
&lt;li>&lt;code>npm&lt;/code> itself may have vulnerabilities and may need to be updated out of cycle from NodeJS.&lt;/li>
&lt;li>Regularly run &lt;code>npm outdated&lt;/code> and &lt;code>npm audit&lt;/code> on both the location you install Node-RED (global by default) and the location where you install contributed nodes. Update nodes regularly or consider the impact of nodes that have dependencies failing audits. Note that &lt;code>npm audit&lt;/code> is only available on newer versions of npm.&lt;/li>
&lt;/ul>
&lt;h1 id="issues-and-limitations">Issues and limitations&lt;/h1>
&lt;h2 id="specifics">Specifics&lt;/h2>
&lt;h1 id="references">References&lt;/h1>
&lt;ol>
&lt;li>&lt;a href="https://nodered.org/docs/security">Node-RED Official documentation on security&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://it.knightnet.org.uk/kb/nr-qa/node-red-internet/">Making Node-RED available over the Internet&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://it.knightnet.org.uk/kb/nr-qa/telegram-bot/">Secure Home Automation Controls via a Telegram Bot&lt;/a>&lt;/li>
&lt;li>Why should we use HTTPS?
&lt;ol>
&lt;li>&lt;a href="https://developers.google.com/web/fundamentals/security/encrypt-in-transit/why-https">Google&amp;rsquo;s take&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.cloudflare.com/learning/security/why-use-https/">Cloudflare&amp;rsquo;s take&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://https.cio.gov/everything/">The US Government&amp;rsquo;s take&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.troyhunt.com/heres-why-your-static-website-needs-https/">A leading security experts take&lt;/a> (Troy Hunt)&lt;/li>
&lt;/ol>
&lt;/li>
&lt;/ol></div></description><author>Julian Knight</author><category domain="https://it.knightnet.org.uk/categories/development">Development</category><category domain="https://it.knightnet.org.uk/categories/it-security">it-security</category><category domain="https://it.knightnet.org.uk/tags/node-red">Node-RED</category><category domain="https://it.knightnet.org.uk/tags/security">security</category></item><item><title>Presentation: Security and Governance in the Cloud</title><link>https://it.knightnet.org.uk/2016/11/cloud-security-and-governance.html</link><guid isPermaLink="true">https://it.knightnet.org.uk/2016/11/cloud-security-and-governance.html</guid><pubDate>Mon, 28 Nov 2016 12:54:25 +0000</pubDate><guid>https://it.knightnet.org.uk/2016/11/cloud-security-and-governance.html</guid><description><div/><div>&lt;p>Here is a presentation that I did recently for NHS CIO’s and CCIO’s.
It is all about how NHS England has followed a journey to cloud services and the IT Security &amp;amp; Information Governance issues we had to deal with along the way. It tries to also show other NHS organisations how they might work towards similar aims.&lt;/p>
&lt;!-- raw HTML omitted --></div></description><author>Julian Knight</author><category domain="https://it.knightnet.org.uk/categories/enterprise">Enterprise</category><category domain="https://it.knightnet.org.uk/categories/it-security">IT Security</category><category domain="https://it.knightnet.org.uk/categories/microsoft">Microsoft</category><category domain="https://it.knightnet.org.uk/tags/cyber-security">cyber security</category><category domain="https://it.knightnet.org.uk/tags/enterprise-architecture">Enterprise Architecture</category><category domain="https://it.knightnet.org.uk/tags/enterprise-systems">Enterprise Systems</category><category domain="https://it.knightnet.org.uk/tags/governance">Governance</category><category domain="https://it.knightnet.org.uk/tags/government">government</category><category domain="https://it.knightnet.org.uk/tags/microsoft">Microsoft</category><category domain="https://it.knightnet.org.uk/tags/nhs">nhs</category><category domain="https://it.knightnet.org.uk/tags/office-365">Office 365</category><category domain="https://it.knightnet.org.uk/tags/presentation">Presentation</category><category domain="https://it.knightnet.org.uk/tags/security">Security</category><category domain="https://it.knightnet.org.uk/tags/solutions-architecture">Solutions Architecture</category></item><item><title>Cloudflare Now Active</title><link>https://it.knightnet.org.uk/2014/10/cloudflare-now-active.html</link><guid isPermaLink="true">https://it.knightnet.org.uk/2014/10/cloudflare-now-active.html</guid><pubDate>Fri, 17 Oct 2014 08:50:05 +0000</pubDate><guid>https://it.knightnet.org.uk/2014/10/cloudflare-now-active.html</guid><description><div/><div>&lt;p>After the recent high-profile vulnerabilities, I decided to turn on the free version of &lt;!-- raw HTML omitted -->CloudFlare&lt;!-- raw HTML omitted --> for this domain.&lt;/p>
&lt;p>CloudFlare provides a reverse proxy service that sits in front of your domain. It will serve content where it can on your behalf (caching), optimise content where it can (e.g. minimising JavaScript, HTML, CSS, etc.). But even more important from my perspective is their ability to protect against a number of vulnerabilities.&lt;/p>
&lt;p>The most obvious protection – because this is where CloudFlare started – is DDOS protection. DDOS is a way of throwing very large numbers of requests at your domain, preventing legitimate access. But CloudFlare also now provide protection against other threats and it is interesting to look at the dashboard and seeing a bunch of threats being filtered out every few days.&lt;/p>
&lt;p>A recent add-on, especially to the free service, is the ability for CloudFlare to provide &lt;!-- raw HTML omitted -->SSL security for free&lt;!-- raw HTML omitted -->. This means that your whole site can present as HTTPS (encrypted HTTP) &amp;amp; you can even enforce this so that visitors cannot connect without encryption. This is easily done without the hassle normally associated with creating and maintaining SSL security.&lt;/p>
&lt;p>Kudos to CloudFlare for providing this excellent service and for providing a useful free version. I’m happy to recommend it to everyone who runs a web site or service.&lt;/p>
&lt;h2 id="update-2018-05-04">Update 2018-05-04&lt;/h2>
&lt;p>I still use CloudFlare for most of my published endpoints.&lt;/p>
&lt;p>However, this blog has now been moved from self-hosted WordPress to
a Hugo-based site hosted by Netlify. Netlify allows me to set all manner of security headers and has inbuilt support for
Let&amp;rsquo;s Encrypt certificates.&lt;/p>
&lt;p>So Cloudflare protection is no longer required for this blog.&lt;/p></div></description><author>Julian Knight</author><category domain="https://it.knightnet.org.uk/categories/blogging">Blogging</category><category domain="https://it.knightnet.org.uk/categories/development">Development</category><category domain="https://it.knightnet.org.uk/tags/security">Security</category><category domain="https://it.knightnet.org.uk/tags/security-threats">security threats</category><category domain="https://it.knightnet.org.uk/tags/threat-management">threat management</category><category domain="https://it.knightnet.org.uk/tags/vulnerabilities">vulnerabilities</category><category domain="https://it.knightnet.org.uk/tags/web">Web</category></item><item><title>Stay Secure! The Latest Recommendations for IT Security</title><link>https://it.knightnet.org.uk/2013/08/stay-secure-the-latest-recommendations-for-it-security.html</link><guid isPermaLink="true">https://it.knightnet.org.uk/2013/08/stay-secure-the-latest-recommendations-for-it-security.html</guid><pubDate>Tue, 27 Aug 2013 21:07:14 +0000</pubDate><guid>https://it.knightnet.org.uk/2013/08/stay-secure-the-latest-recommendations-for-it-security.html</guid><description><div>Individuals and enterprises do not understand the value of their Information nor how to protect it. This article attempts to reveal simple and practical ways to protect IT assets and outlines some of the latest thinking and tools from industry experts.</div><div>&lt;p>IT Security changes over time and it is important to stay abreast. New threats are appearing all the time and so threat management also needs to change.&lt;/p>
&lt;p>Here are some tips and pointers to the current thinking in IT Security.&lt;/p>
&lt;p>Back in February of this year (2013), the &lt;!-- raw HTML omitted -->Centre for Strategic and International Studies (CSIS) in the USA published a short but to the point paper&lt;!-- raw HTML omitted --> on how to successfully combat the majority of current cyber security threats. The paper gives an excellent background to the latest threats without getting too technical. But the great thing is the 4 steps that they give to combating the majority of current threats.&lt;/p>
&lt;p>These are summarised as:&lt;/p>
&lt;!-- raw HTML omitted -->
&lt;pre>&lt;code>&amp;lt;li&amp;gt;
&amp;lt;div dir=&amp;quot;ltr&amp;quot; data-font-name=&amp;quot;g_font_p0_1&amp;quot; data-canvas-width=&amp;quot;152.32256276321408&amp;quot;&amp;gt;
&amp;lt;em&amp;gt;Patch operating system vulnerabilities, for the same reasons discussed above&amp;lt;/em&amp;gt;.
&amp;lt;/div&amp;gt;
&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;
&amp;lt;div dir=&amp;quot;ltr&amp;quot; data-font-name=&amp;quot;g_font_p0_1&amp;quot; data-canvas-width=&amp;quot;613.1027311220175&amp;quot;&amp;gt;
&amp;lt;em&amp;gt;Minimize the number of users with administrative privileges, the highest level of authority to make changes or undertake actions on a network&amp;lt;/em&amp;gt;.&amp;lt;br /&amp;gt; Users with administrative privileges are the goldmine for the bad guys. They are the easy back door into the heart of your enterprise systems.
&amp;lt;/div&amp;gt;
&amp;lt;/li&amp;gt;
&lt;/code>&lt;/pre>
&lt;!-- raw HTML omitted -->
&lt;!-- raw HTML omitted -->
&lt;!-- raw HTML omitted --></div></description><author>Julian Knight</author><category domain="https://it.knightnet.org.uk/categories/general">General</category><category domain="https://it.knightnet.org.uk/tags/anti-virus">anti virus</category><category domain="https://it.knightnet.org.uk/tags/cyber-security">cyber security</category><category domain="https://it.knightnet.org.uk/tags/enterprise-systems">Enterprise Systems</category><category domain="https://it.knightnet.org.uk/tags/patching">patching</category><category domain="https://it.knightnet.org.uk/tags/security">Security</category><category domain="https://it.knightnet.org.uk/tags/security-threats">security threats</category><category domain="https://it.knightnet.org.uk/tags/software">software</category><category domain="https://it.knightnet.org.uk/tags/threat-management">threat management</category><category domain="https://it.knightnet.org.uk/tags/vulnerabilities">vulnerabilities</category><category domain="https://it.knightnet.org.uk/tags/whitelisting">whitelisting</category></item><item><title>Update on FreeOTFE</title><link>https://it.knightnet.org.uk/2008/03/update-on-freeotfe.html</link><guid isPermaLink="true">https://it.knightnet.org.uk/2008/03/update-on-freeotfe.html</guid><pubDate>Wed, 05 Mar 2008 15:19:00 +0000</pubDate><guid>https://it.knightnet.org.uk/2008/03/update-on-freeotfe.html</guid><description><div/><div>&lt;p>Thought I would add a quick update on using FreeOTFE under Windows and PocketPC.&lt;/p>
&lt;p>I tried it under Windows on a different PC and it does indeed work OK though it is nowhere near as polished as TrueCrypt.
I’ve also tried again a few times on a PocketPC with limited success and I think I know what is happening. Firstly, you must install FreeOTFE for PPC into system memory and not on a storage card – not terribly surprising really. However, you do not seem to be able to use a secure volume from a storage card either very reliably (I tried on a T-Mobile MDA Compact III). I did have some success creating a small volume (approx. 2MB) in main memory, it did load eventually. Sorry to say that this is unworkable and I’ll be sticking to Keepass and Tombo on PPC with TrueCrypt on Windows and Linux.
It is worth noting in passing that TrueCrypt for Linux now has a native UI.&lt;/p></div></description><author>Julian Knight</author><category domain="https://it.knightnet.org.uk/categories/software">Software</category><category domain="https://it.knightnet.org.uk/tags/cross-platform">Cross-Platform</category><category domain="https://it.knightnet.org.uk/tags/encryption">Encryption</category><category domain="https://it.knightnet.org.uk/tags/security">Security</category></item><item><title>Keeping information secure but accessible across platforms</title><link>https://it.knightnet.org.uk/2008/01/keeping-information-secure-but-accessible-across-platforms.html</link><guid isPermaLink="true">https://it.knightnet.org.uk/2008/01/keeping-information-secure-but-accessible-across-platforms.html</guid><pubDate>Mon, 21 Jan 2008 21:20:00 +0000</pubDate><guid>https://it.knightnet.org.uk/2008/01/keeping-information-secure-but-accessible-across-platforms.html</guid><description><div/><div>&lt;p>One of the issues with Linux is that I can’t use it under all circumstances. In particular I usually have to work with Windows at work. So I need cross-platform tools, especially now that I also make extensive use of a smartphone/PDA.
So here is a timely post – with the number of people in UK government departments carelessly loosing private or secret information, how do we keep this stuff secure while still being accessible from different platforms? Oh, and we don’t really want to pay out money for the privilege if we don’t have to!
Well, I’ve looked at 3 tools that will do everything we need and they wont cost a penny.
First up is &lt;!-- raw HTML omitted -->Keepass&lt;!-- raw HTML omitted -->.&lt;/p>
&lt;p>&lt;!-- raw HTML omitted -->Keepass&lt;!-- raw HTML omitted --> is a tool for storing passwords, primarily aimed at web site use but it serves perfectly well for storing any password type information and I use it for storing license numbers, router passwords, etc.&lt;/p>
&lt;p>&lt;!-- raw HTML omitted -->Keepass&lt;!-- raw HTML omitted --> runs on Windows as the main platform and that version has some really nice features such as a macro language for logging in to web sites and the ability to run local applications. This version does not need to be installed so it will run from a pen drive as well.&lt;/p>
&lt;p>There is also a version for Windows Mobile/PocketPC, just synchronise the database file to keep it in step with the desktop.&lt;/p>
&lt;p>Then there is [&lt;!-- raw HTML omitted -->KeepassX&lt;!-- raw HTML omitted -->][1] which runs under Linux and Mac OS. It is not quite as feature rich as the Windows version but it still does nicely.
The remaining two applications all work with virtual (or real) disk partitions by encrypting them and allowing you to access them like ordinary disks.
[&lt;!-- raw HTML omitted -->TrueCrypt&lt;!-- raw HTML omitted -->][2] comes first. This is supported on Windows and Linux (a Mac version is due out in Jan 2008). It is pretty easy to use under Windows. Linux only has a GUI for Gnome but you can also use [&lt;!-- raw HTML omitted -->ScramDisk for Linux&lt;!-- raw HTML omitted -->][3] as a GUI under KDE. &lt;!-- raw HTML omitted -->TrueCrypt&lt;!-- raw HTML omitted --> does not need to be installed so runs nicely from a pen drive. Sadly, there is no mobile version.
[&lt;!-- raw HTML omitted -->FreeOTFE&lt;!-- raw HTML omitted -->][4] is notable in that it supports Windows, Windows Mobile/PocketPC and Linux. The Linux support is via LUKS which is a standardised, well supported loopback encryption application ([how to create a loopback secure container][5]). I’ve not tried &lt;!-- raw HTML omitted -->FreeOTFE&lt;!-- raw HTML omitted --> yet, but it does seem to have a good range of capabilities. Under Windows, it also works with the [&lt;!-- raw HTML omitted -->Secure Tray utility&lt;!-- raw HTML omitted -->][6] (also by the same author, Sarah Dean) which allows for the automatic running of applications when a volume is mounted. I am sure that I’ll be trying this out at some point.&lt;/p>
&lt;p>&lt;!-- raw HTML omitted -->&lt;!-- raw HTML omitted -->Update 2008-01-24:&lt;!-- raw HTML omitted -->&lt;!-- raw HTML omitted --> Sadly, the PDA version of &lt;!-- raw HTML omitted -->FreeOTFE&lt;!-- raw HTML omitted --> cannot mount Linux volumes so there is still not a true cross-platform solution. The best I can do is to set up TrueCrypt for PC/Linux (easier than &lt;!-- raw HTML omitted -->FreeOTFE&lt;!-- raw HTML omitted -->) and &lt;!-- raw HTML omitted -->FreeOTFE&lt;!-- raw HTML omitted --> for PC/PDA with an automated sync between the two.&lt;/p>
&lt;p>&lt;!-- raw HTML omitted -->&lt;!-- raw HTML omitted -->Update 2008-01-29:&lt;!-- raw HTML omitted -->&lt;!-- raw HTML omitted --> I’ve now actually tried FreeOTFE on a PC and on a WM5 device and I’m afraid that they tend to hang almost continuously so this is not really an option I can recommend. It’s a shame as it looks great on paper. There is a real missed opportunity here, especially if the PDA version were to support Linux volumes.
&lt;!-- raw HTML omitted -->&lt;!-- raw HTML omitted -->Update 2008-07-10:&lt;!-- raw HTML omitted -->&lt;!-- raw HTML omitted --> An additional plus for FreeOTFE is that it does not require admin access (under Windows) to run. I suspect that this will get more and more important as more organisations lock down their PC’s but continue to fail to provide sufficient support and capabilities.
&lt;!-- raw HTML omitted -->Between &lt;!-- raw HTML omitted -->TrueCrypt&lt;!-- raw HTML omitted --> and &lt;!-- raw HTML omitted -->FreeOTFE&lt;!-- raw HTML omitted -->, I’d say the former is easier to use as it hides much of the gory bits away but &lt;!-- raw HTML omitted -->FreeOTFE&lt;!-- raw HTML omitted --> has the features and cross-platform support. I may well find use for both.&lt;/p>
&lt;p>&lt;!-- raw HTML omitted --> Given the problems with FreeOTFE that I experienced. I’ll carry on using TrueCrypt on Windows and Linux and [Tombo][7] on the PDA and Windows with manual copies between the two – drat, too much reliance on Windows.
[1]: &lt;a href="http://www.keepassx.org/">http://www.keepassx.org/&lt;/a>
[2]: &lt;a href="http://www.truecrypt.org/">http://www.truecrypt.org/&lt;/a>
[3]: &lt;a href="http://sd4l.sourceforge.net/">http://sd4l.sourceforge.net/&lt;/a>
[4]: &lt;a href="http://www.freeotfe.org/">http://www.freeotfe.org/&lt;/a>
[5]: &lt;a href="http://www.mayrhofer.eu.org/Default.aspx?pageindex=6&amp;amp;pageid=34">http://www.mayrhofer.eu.org/Default.aspx?pageindex=6&amp;amp;pageid=34&lt;/a>
[6]: &lt;a href="http://www.sdean12.org/SecureTrayUtil.htm">http://www.sdean12.org/SecureTrayUtil.htm&lt;/a>
[7]: &lt;a href="http://tombo.sourceforge.jp/En/">http://tombo.sourceforge.jp/En/&lt;/a>&lt;/p></div></description><author>Julian Knight</author><category domain="https://it.knightnet.org.uk/categories/linux">Linux</category><category domain="https://it.knightnet.org.uk/categories/windows">Windows</category><category domain="https://it.knightnet.org.uk/tags/security">Security</category><category domain="https://it.knightnet.org.uk/tags/freeotfe">FreeOTFE</category><category domain="https://it.knightnet.org.uk/tags/truecrypt">TrueCrypt</category><category domain="https://it.knightnet.org.uk/tags/keepass">Keepass</category></item></channel></rss>