Inevitably, it has become known as Celebgate. Starting on 26 August, private, often nude, semi-nude or otherwise compromising photographs of upwards of 100 female celebrities, including actresses Jennifer Lawrence and Kirsten Dunst, began to leak on to the web.

The haul was clearly the result of a serious hacking attack on the Apple iCloud accounts of these people but to date the perpetrators have not been identified, although the FBI is on the case. In due course, people will go to jail for this because some of the stolen photographs were taken when the subjects were underage, which means that anyone circulating or downloading them was/is trafficking in child pornography.

Given that we live in a celebrity culture, the breach has, not surprisingly, generated a lot of heated media attention – about online security (or, more accurately, insecurity), narcissism, the anarchic ungovernability of cyberspace and, of course, the end of civilisation as we know it. What has been less discussed is what this little firestorm tells us about ourselves. In that context, the news is not good.

But first, the online security angle. Since most of the victims are paid-up members of the Church of Apple, their compromising selfies were probably taken on iPhones and then uploaded to iCloud, the company's online storage system. Given the cunning way in which Apple sets the default settings on new iPhones –the default allows for all your data to be backed up – it's possible that some of the victims didn't even know that their stuff was in the cloud. As far as they were concerned, the photographs were on their phones and therefore safe. At the very least, this should serve as a wake-up call for all those non-celebrity iPhone users to check their default back-up settings.

Apple responded vigorously to deny that there had been any systemic breach of iCloud security. The images were stolen by people hacking into individual accounts using some combination of guesswork and information about targeted individuals gleaned from social media and other online sources. The general methodology was demonstrated last week by two Guardian journalists who attempted to use this approach to break into one another's accounts. (As it happened, each failed, but my guess is that if they had persisted they would eventually have struck lucky.)

There are three immediate lessons from this for the rest of us to learn: don't ever put really private stuff in the cloud without encrypting it – and if you don't know how to encrypt it then keep it offline; use two-factor verification ; and never, ever post your real date of birth on any social networking site. In some quarters, Celebgate prompted hand-wringing and tut-tutting about contemporary mores from Disgusted of Tunbridge Wells. What are these people doing, taking photographs of themselves naked or in compromising situations? This is narcissism gone mad etc, etc. But it turns out that people who think like that are, well, over the hill.

Writing in the Guardian, Zoe Williams offered wrinklies an update on modern culture. Naked selfies, she says, are a cultural phenomenon. If you don't ask who has naked photos in the cloud, you don't find out, writes Williams. "Which is a big hole in your knowledge, because the answer is everybody. Everybody but you."

The most revealing aspect of the whole affair, however, came from Google. Once the word got out that illicit photographs of Jennifer Lawrence were on the net, searches on Google for "Jennifer Lawrence" went through the roof . Which means, to put it crudely, that millions of people had the idea of further invading her privacy, of compounding the original crime. And that they probably embarked on the quest to do that without thinking of the implications of what they were doing. For, as one (female) Twitter user put it: "Remember, when you look at these pictures you are violating these women again and again. It's not OK."

It's not. Ever since 1993, when Mosaic, the first graphical browser, transformed the web into a mainstream medium, the internet has provided a window on aspects of human behaviour that are, at the very least, puzzling and troubling.

In the mid-1990s, for example, there was a huge moral panic about online pornography, which led to the 1996 Communications Decency Act in the US, a statute that was eventually deemed unconstitutional by the Supreme Court. But when I dared to point out at the time in my book, A Brief History of the Future: The Origins of the Internet, that if there was a lot of pornography on the net (and there was) then surely that told us something important about human nature rather than about technology per se, this message went down like a lead balloon.

It still does, but it's still the important question. There is abundant evidence that large numbers of people behave appallingly when they are online. The degree of verbal aggression and incivility in much online discourse is shocking. It's also misogynistic to an extraordinary degree, as any woman who has a prominent profile in cyberspace will tell you.

One such is Professor Mary Beard, the Cambridge classicist. "It doesn't much matter what line of argument you take as a woman," she told the New Yorker recently. "If you venture into traditional male territory, the abuse comes anyway." One tweet that had been directed at her read: "I'm going to cut off your head and rape it." And Professor Beard's experience is not unusual: lots of other prominent women writers, bloggers and Twitter users have been subjected to the same kind of abuse.

There's no point in blaming the internet for this. All the technology has done is to reveal a deeply unpleasant truth: when you remove the social constraints on behaviour that operate in the offline world, then a darker side of human nature emerges snarling into the light.

And the most troubling aspect of this is the revelation that a large number of males appear to harbour a deep hatred of women. Why this is so is a question for psychologists and anthropologists. But the glee with which millions of internet users clicked on the stolen selfies of Jennifer Lawrence et al is just the latest example of it. And there's lots more where it came from.