I was recently explaining to a group of colleagues how a hacker gains access to a system. Then it hit me; most people are engrained with the hacking scenes in movies and they honestly think that is what happens in real life.
So I’ve decided to write the most layman-like content of how an attack is usually executed, probably over a few blog posts.
In this context, we will use Blancorp as the target company, i.e. the one being targeted by the hacker(s). Blancorp will be an institution with 70+ employees, internal computer systems, several websites, servers, databases and almost the infrastructure for a normal functioning of a company.
Spear Phishing
Most successful hacks are targeted attacks. What this means is that attackers single out specific individuals inside the organization and then focus to compromise them.
Spear phishing is what this means. It means a targeted phishing attack against an employee of an organization.
Plot
Blancos is an admin in the ICT department at Blancorp. This is a well known fact. He is active on social media, he gives occasional media interviews, speeches and marketing campaigns for his company.
Attackers know that Blancos will be a hard target to compromise, but they also know that if they can compromise his account, they gain full privileged access to the entire Blancorp network.
So they target someone lower on the infosec list. The attackers sent an unsolicited email to the front-desk asking for a clarification on what seems like a cheque gone wrong. The help-desk staff opens the cheque to confirm it’s content.
Bad mistake!
Hidden to them, the document ran a script, that downloaded some more code in the background, and planted itself on the machine. The code registered itself in the registry, and now it will run every time the computer is turned on.
The good news however, is that the admin has configured the system with the least access privilege in mind. This meant that this user, having less privileges on the network, cannot execute advanced commands and hence the code cannot propagate on the network using her credentials.
Escalation
The attackers noticed this. So they come up with another way. Remember they have access to the help desk machine, but that’s about it. They need some more privileged access.
They ran background processes in the help desk computer to a point that the computer ran so slowly to properly perform any tasks. So the lady does what everyone does, she calls IT.
The admin comes over to check the computer. He needs root (admin) access on the computer to properly diagnose the issue.
As the admin logged in to their account on the client’s computer, a little known fact would haunt this action. You see, the attackers had installed a keylogger on the help desk computer. This meant that every single keystroke was recorded. And this included the admin’s credentials. The hackers had hit the jackpot. They now had the admin username and password, and with these credentials, they could log in to any system on the network, servers, and all, and change the settings.
Remember, all this started with an email address.