random thoughts to oil the mind

Month: January 2019

Daily Links

Reflections – A fabulous series of photographs from Tom Hussey showing elderly people looking at the reflections of their past selves.

Anthea Bell Obituary – One of the most prolific and successful translators into English from French, German and Danish, and brainmother of the brilliant Dogmatix and Getafix generation of loveable Asterix characters.

Paul Ryan’s Long Con – An interesting article from Vox on this failed poster boy for an almost sane GOP.

TED: Economies of Growth – Economist Kate Raworth on the importance of breaking out of the growth trap. I’m sceptical that mankind will voluntarily find a happy equilibrium, but Malthus will get us in the end.

[Photo by Patrick Fore on Unsplash]

Cybercrime and the DarkNet

Cybercrime and the Dark Net by Cath Senker

As society tries to catch up with the overwhelming advancements in technology of the past few decades, it is unsurprising that governments and legislators find themselves plugging the gaps where criminality can flourish. Developments in encryption, obfuscation, distribution and anonymisation give criminals and privacy activists alike a broad toolkit for conducting their activities away from prying eyes. In Cybercrime and the Dark Net, Cath Senker offers a brief and easily digested overview of this bewildering digital landscape. The book is essentially a collection of short vignettes covering a wide variety of different forms of cybercrime, with an essentially separate second section surveying the dark net.

This is a successfully written book, but unfortunately hardly a well-written one. There is nothing wrong with the craft, nothing wrong with the content per se, but it reads very much like an undergraduate essay written with an eye to meeting a word count, rather than sculpting a theory or trying to convey specific information. I would call the style journalistic, in the sense that there is a tendency to focus on individual instances, leading to sweeping generalisations without any valid attempt at contextualisation. We’re treated to two pages detailing an instance of a young American woman whose social security number had been stolen and used to file false tax returns. Senker makes some unfounded statements about what the thieves could have done with the information, and offers the rather dubious claim that people are now filing their tax returns earlier for fears someone else will file them first, before then revealing that the IRS responded to the woman in question saying that the issue had been settled. The victim never discovered how the security breach had happened, ergo this needn’t even have been a cybercriminal offence and has little relevance for the subject matter.

Senker has clearly done a decent amount of research into this subject. Give that this is designed to be a popular introductory book on the subject, a few small mistakes in the technical nuances are relatively moot, and can certainly be forgiven given that the author isn’t an expert in the field. Subjects are well introduced and explained, while plenty of footnotes are provided for those interested in following a matter of particular interest. But again, bearing more than a passing resemblance to a university essay, the text is peppered with quotes and statistics which only ostensibly support the text and in fact rather serve to bring up more questions. In a section on online grooming, we’re told that technology facilitates the contact between paedophiles and children. A fair claim, but to bolster this argument, the next sentence tells us that Childline reported a 50% annual increase in online grooming cases in December 2015. That’s it; the line is left without further comment. But how does this bombshell fact actually support her argument? Did technology change so significantly in 2015 to lead to such an explosion in online grooming? Is this part of a general year-on-year trend or a statistical outlier? Maybe this is evidence that support services are using more successful tactics to reach those in need and should actually be interpreted as a positive indicator? Or is this evidence of groomers changing their tactics? Since the site reveals that the sample size is only in the hundreds, it would seem rather sensationalist to see any significance in the figure, and its uncommented conclusion here seems not only unnecessary, but extremely misleading.

While many of the footnotes feel like cosmetic extras, there are also occasions in the text where it is anything but clear what the author actually wants to say. In the section covering the darknet and methods of encrypting emails, we’re told that Irish-Islandic privacy activist Smári McCarthy encourages people to use encryption to increase the costs of government surveillance. This is followed by the statement: ‘if they did the cost would rise from 13 US cents a day (9p) to US $10,000 (more than 7,000 GBP).’ The cost of what, government surveillance? Measured in what? Obviously this statement can’t be taken at face value, but I’m stumped as to what these numbers are supposed to refer to. She concludes this short section by stating that this might lead governments to place only suspicious persons under surveillance, or alternatively for governments to spend more resources on surveillance, driving ever more people to communicate via the darknet. While I don’t expect the author to have access to a crystal ball, the entire section is muddled and lacks clarity.

Frustrations like this sadly abound in this lightweight volume. Somewhere under the editor’s chisel there may be a fairly decent introductory book. As it stands, I found the numerous non sequiturs, sensationalist statistics, minor inconsistencies and incongruities to make this a dissatisfying reading experience. The book lacks a certain clarity of purpose and instead attempts to cover and tie together too many bases in barely 150 pages.

[Photo by Markus Spiske on Unsplash]

Migrating phpBB to NodeBB

I recently set about migrating an aging phpBB forum to NodeBB and ran into enough problems that I considered cancelling the whole project.

The phpBB exporter script has been updated various times, and I managed to find a fork which appears to work with phpBB 3.2. Unfortunately, it refused to install itself correctly and appeared to land in the wrong directory, so I had to manually clone the Github project into the expected subdirectory.

And bingo! The import worked, and after disabling/deleting unnecessary plugins and updating NodeBB to the latest branch, the majority of things were working as expected. A few things remain to be fixed, in particular navigating mongodb’s structure to perform a few custom replacements where the import script had trouble deciphering bbcode.

Fortunately StackOverflow provided a good start:

var bulk = db.getCollection('objects').initializeUnorderedBulkOp();
var count = 0;
db.getCollection('objects').find({$and: [{_key:{$regex: /^post:\d+$/}}, {content: {$regex: /<size size="150">(.*?)<\/size>/}}]}).forEach(function(entry){
    var newContent = entry.content.replace(/^<size size="150">(.*?)<\/size>/gm, "## $1");
    print(newContent);
    bulk.find( { _key: entry._key } ).updateOne( { 
        $set: { 'content': newContent } 
    });
    count++;
    if (count % 100 === 0) {
        // Execute per 100 operations and re-init
        bulk.execute();
        bulk = db.getCollection('objects').initializeUnorderedBulkOp();
        count = 0;
    }
})

// Clean up queue
if (count > 0)  bulk.execute();

Using this I was able to find and replace those tags which had been missed and replace them with valid markdown.

[Photo by Kobu Agency on Unsplash]

Powered by WordPress & Theme by Anders Norén