Mike Meredith

May 232017
 

I woke up this morning to the news of the Manchester bombing this morning; learning about what was going on from a forum that had attracted some of the more rancid members of the far right. Who were busy blaming this atrocity on all muslims, but also on Syrian refugees; all this of course before anyone knew any facts because facts are irrelevant to the bigoted far right.

And a particularly nasty piece of work has labelled the victims “sluts” and “whores” (I’ve linked to a site that discusses his comments in order not to give him any extra ad revenue).

Now I am not in the habit of being sympathetic to any religious group – they all believe in imaginary friends. But they’re people and in many cases my fellow countrymen, so when a gang of pathetic little chickenshit cowards labels all muslims as terrorists, it is time to call them out on their bigoted bullshit.

Yes the evil scum who set off the bomb was a muslim; one born in Britain and not a Syrian refugee.

But :-

  1. It is almost certain that some of the 60 ambulances that attended were crewed by a muslim or two.
  2. It is almost certain that some of the police who were there helping people out were muslims.
  3. It is almost certain that some of those who opened their homes to accommodate stranded
  4. Some of the taxi drivers who turned off their meters and offered free lifts to those stranded were muslims.

Of course Mancunians of all faiths and none rallied around and helped out, but as muslims were being painted with the terrorism brush, it seems reasonable to highlight that many of those helping out were muslims.

May 202017
 

I just love messing around with run-time languages that I know relatively little about (and if your sarcasm detector isn’t flashing red about now, take it out and give it a good talking to).

The problem detailed here is something that you are unlikely to encounter unless you get into weird stuff like running an odd-ball window manager, aren’t content with the version of said window manager distributed with your Linux distribution, and are used to re-compiling things from scratch.

It all started when I upgraded Ubuntu on my work machine (to Zesty Zapus). The window manager version was upgraded from 3.5 to 4.0, which broke on my configuration file (3.5); not a big problem I thought, as I had already upgraded my window manager at home to 4.1 and reconfigured the configuration file. I copied the updated configuration file from home into place.

And it failed. Apparently I use 4.1-isms within the file. As I was not happy about tinkering with the file to downgrade it (in a language I know relatively little about), I decided to re-compile Awesome 4.1 instead.

Which failed with a weird error :-

» awesome --version
awesome v4.1 (Technologic)
 • Compiled against Lua 5.3.3 (running with Lua 5.3)
 • D-Bus support: ✔
 • execinfo support: ✔
 • xcb-randr version: 1.4
 • LGI version: [string "return require('lgi.version')"]:1: module 'lgi.version' not found:
	no field package.preload['lgi.version']
	no file '/usr/local/share/lua/5.3/lgi/version.lua'
	no file '/usr/local/share/lua/5.2/lgi/version.lua'
	no file '/usr/local/share/lua/5.3/lgi/version/init.lua'
	no file '/usr/local/share/lua/5.2/lgi/version/init.lua'
	no file '/usr/local/lib/lua/5.3/lgi/version.lua'
	no file '/usr/local/lib/lua/5.3/lgi/version/init.lua'
	no file '/usr/share/lua/5.3/lgi/version.lua'
	no file '/usr/share/lua/5.3/lgi/version/init.lua'
	no file './lgi/version.lua'
	no file './lgi/version/init.lua'
	no file '/usr/local/lib/lua/5.3/lgi/version.so'
	no file '/usr/lib/x86_64-linux-gnu/lua/5.3/lgi/version.so'
	no file '/usr/lib/lua/5.3/lgi/version.so'
	no file '/usr/local/lib/lua/5.3/loadall.so'
	no file './lgi/version.so'
	no file '/usr/local/lib/lua/5.3/lgi.so'
	no file '/usr/lib/x86_64-linux-gnu/lua/5.3/lgi.so'
	no file '/usr/lib/lua/5.3/lgi.so'
	no file '/usr/local/lib/lua/5.3/loadall.so'
	no file './lgi.so'

Which had me stumped for a while, and it turns out that DuckDuckGo didn’t have an obvious fix (one of the reasons for writing this).

Eventually I figured out that awesome was not finding the LGI module (I can be slow at times) which was odd because it was definitely installed. However it turns out that it was installed in /usr/share/lua/5.2/lgi. So despite having lua 5.3 installed, extra lua modules can only be seen if you have lua 5.2 installed?

The “fix” for this was to create an environment variable telling LUA to search for files in rather more places before starting Awesome :-

export LUA_PATH="/usr/local/share/lua/5.3/?.lua;/usr/local/share/lua/5.2/?.lua;/usr/local/share/lua/5.3/?/init.lua;/usr/local/share/lua/5.2/?/init.lua;/usr/local/lib/lua/5.3/?.lua;/usr/local/lib/lua/5.3/?/init.lua;/usr/share/lua/5.3/?.lua;/usr/share/lua/5.2/?.lua;/usr/share/lua/5.3/?/init.lua;/usr/share/lua/5.2/?/init.lua;./?.lua;./?/init.lua"

This was created by running lua from the command line and running print(package.path) to display the default setting, and adding the 5.2 equivalent for many elements.

As to whether it works or not, well I cannot be sure (I’m not going into work on a weekend just to check if the window manager fires up), but Awesome itself seems happy with the result :-

» awesome --version
awesome v4.1 (Technologic)
 • Compiled against Lua 5.3.3 (running with Lua 5.3)
 • D-Bus support: ✔
 • execinfo support: ✔
 • xcb-randr version: 1.4
 • LGI version: 0.9.1

So it can find LGI, but whether it can do anything useful with it remains to be seen!

May 172017
 

It may not be very funny, but the funny thing about WannaCrypt is that it is somewhat of a failure! Unless the authors are spectacularly stupid (not entirely impossible incidentally), they have no way to recover their ill-gotten gains. The pile of looted bitcoins they have acquired is fully visible, so any attempt to use those coins will almost certainly result in them being tracked down – they have attracted too much attention.

Which is another aspect of the WannCrypt malware – it has highlighted the vulnerability (MS17-010) and caused a huge vulnerability hunt. Which is causing those who wrote other malware (such as Adylkuzz) to gnash their teeth, because otherwise their malware would have quietly worked away in the background. The malware authors behind Adylkuzz have probably made more money than the WannaCrypt malware authors … and may well get away with their loot too.

Which is why other malware authors “wannacry” – the attention that WannaCrypt has gotten has ruined MS17-010 for them.

May 172017
 

It seems rather strange when you discover it, but Windows Update sometimes lies about what updates have been installed. I am not sure how often this happens, but it does happen from time to time. Which with WannaCrypt rampaging around is somewhat unfortunate.

What seems to happen is that Windows Update gets confused about what patches it has installed – it’s internal database gets corrupt. One possible fix for this is to remove the database :-

net stop wuauserv
cd %systemroot%
ren SoftwareDistribution SoftwareDistribution.old
net start wuauserv
rd /s/q SoftwareDistribution.old

When using Windows 10, you may well have to start (net start wuauserv) Windows Update services before stopping them. Once you have removed the directory, the next time you run Windows Update in the gooey, it will spend some time rebuilding it’s database and hopefully will then pick up the missing updates. No promises but this worked on at least one server that had unacknowledged missing patches.

Of course without a proper vulnerability scanner it may be tricky to determine when Windows is lying about being fully patched. The best bet is to assume it is lying whenever something like WannaCrypt comes along.

The other possibility is to look into something like Autopatcher which is intended for offline updates – you can download the Microsoft updates and use the tool to patch Windows computers from the downloads.

May 082017
 

Many of us know about the story of King Canute (or probably Cnut) and his attempt to hold back the tides. Although we English typically only give one king the suffix “the Great” (Alfred), Cnut himself is also known as “the Great” (perhaps more for his non-English endeavours). So it seems a touch unlikely that such a king would imagine he could control the waves by verbal command; if anything he might want to make fun of his courtiers by trying the impossible to indicate he was human.

It is a popular tale with the Church too – it’s a great example of over-weaning pride which is one of the seven deadly sins. And Cnut as a Dane, probably was not the most popular king with the church, as Danes had only recently given up going viking and pillaging churches and monasteries (in the words of a fictional viking: “they gather all their gold and silver into one building. And then so conveniently mark those buildings with crosses.¨).

But there is a far more prosaic explanation for the tale in which the Church uses a human disaster to laugh at people’s efforts to improve themselves.

Before the raw sewage pollution in the 19th century put an end to it, the South coast was home to a massive oyster fishing industry that existed in the region for at least two thousand years. Indeed, oysters were one of the staple food sources for the poor until the 19th century.

One of the ways that shallow water oyster fisheries can be improved is by building dyke-like structures that allow the high tide in, but keep some of the tide from escaping at low tide. As it happens, a place in West Sussex called Bosham happens to be ideal for this, and there is supposedly much archaeological evidence to show that these “dykes” had been built there repeatedly over the centuries.

As anyone who lives by the sea knows, to build sea structures, you have to over-build and even then, exceptional storms will cause damage, and there is also archaeological evidence to show that the “dykes” at Bosham were washed away in exceptional storms every few hundred years.

As it happens, Bosham was a royal estate in the time of Cnut (one of his daughters is supposedly buried at the pictured church), and it is all too likely that an exceptional storm would have destroyed the oyster beds whilst Cnut was holding Bosham. Thus the Church had an opportunity to use an economic disaster to poke fun at king they were probably not too fond of.