# What would a good hacking gameplay look/feel like?

In real life, 'hacking' (that is, using brute-force attacks to guess a password) is not very interactive. In fact, it works pretty much independent of any user from the moment you press Return until it finds the password. Now, I am making a home project game in Unity where you are a computer, and you can interact with everything from cameras to door to explodable gas pipes. Now for difficulty and fun, some things are secured with passwords of varying difficulties. The passwords are chosen for each camera by the basic formula of picking a random integer number between 1 and (10 to the power of x), where x is set in the editor under "security level".

Right now, for the purpose of creating other aspects of the game, hacking is simply pressing 'G' while pointing at a camera, letting the computer compare each number from 0 onwards until the guess matches the cameras passcode - then when it does, the camera becomes 'unsecured' and it can be switched to. Obviously, this is uber simplistic and is not the final gameplay. My problem is what would the final gameplay look like? I want it to be enjoyable and interactive (i.e. not just the computer randomly guessing upwards) but at the same time not corny and ridiculously unrealistic (i.e. not the absurd things seen in action movies which are nothing like actual hacking). I would prefer it somewhere in between, but I am stumped as to how it would look and feel. Any suggestions are welcome, and if there are any examples from a game that I can use for inspiration, that would be great too, thanks.

## Criteria

• Interactive
• Not super unrealistic or absurd
• Must guess passwords in a way which works with the (> 1, < 10x) formula
• Have a look at the video game Uplink - en.wikipedia.org/wiki/Uplink_(video_game) – KaiserJohaan Sep 29 '15 at 7:06
• I'm sorry, but such open-ended idea generation questions are not a good fit for a question&answer site. It's a question you should rather address to a discussion forum or chat. – Philipp Sep 29 '15 at 8:31
• @Philipp I did wonder that when I posted the question, what would be the right place to post it on Stack Exchange? – DJpotato Sep 29 '15 at 13:24
• @DJpotato As I said, this is not a topic for a question&answer site like those of the stackexchange network. – Philipp Sep 29 '15 at 13:27
• Ohhh Ok, sorry I didn't realise, do you want me to take it down? – DJpotato Sep 29 '15 at 13:41

I'm not a hacker, so I cannot ensure the following is realistic. However, it seems less absurd that most "hack" things in classic video games and could be enjoyable to play:

## Automatic tests

A classic way to try to crack a password: try every number from 1 to 10x automatically. The player can start a script and try to do other things while the script is running and shall stop when it would find the correct number.

This script would have a duration of 10x * T, where T is time between each attempt. This time can be a game-play feature, like depends of resources available by the player, or camera security system, etc.

### Systems update

Player can increase its CPU level in order to be able to make this kind of tests faster.

## Clues

To parry the last technique, many password systems block themselves after a precise attempt number, or ask for a captcha. The last method would be useless to those systems.

So another technique can be to give clues to the player about the password and force him to guess the complete number from them. Those clues can be found from other points than the camera (databases for instance) or can be given when the player enter a bad number.

Those clues can be:

• Above or under a precise number, like the one entered by the player on a failed attempt. The number is below 1583098
• How many different digits are there. There are five different digits
• How many digits of a kind is there. There are two times the number 4
• How many digits are common with another number, like the one entered by the player on a failed attempt. There are 3 common digits with 78217
• etc.

If a player deplete every attempts he had, the level can be failed, the camera blocked for the level or just points lost.

### Systems update

An interesting update here can be automatic captcha recognition, that would increase (or just suppress) the attempt limit for a protected system.

There may be several captcha levels or types, each one requiring an appropriate recognition skill to pass through.

## Generate them

A realistic approach could be that passwords are generated everyday from another computer, with an algorithm hashing a character string, maybe the past day password.

In that case, you can find today's password on two ways:

• Hacking the computer that generated it, if it saved a generation historic. (You would get every password generated by it, so don't link every camera with the same or make it well defended if you don't want to make your level too easy)
• Regenerate them like it did this night. For this, you shall need the algorithm and the used character string. Both can be found by different ways, so it can vary upon levels.

### A harder generation

In order to increase difficulty, you can here simply increase the password generation procedure. For instance, what if the password wasn't generated by one computer, but many, with each of them hashing the password on a different way?

Here are very simple algorithms, but you got the idea.

In order to regenerate it, you have to know the initial character string and the algorithm lists, as well as the order to use them.

The player can recover algorithms pretty much everywhere in the level, and then have to know in which order to apply them and on which initial number (or character string) to generate the good password. Once again, an attempt limit can avoid him to try every combinations until find the good one (that would be tedious.)

### Systems update

Sometimes, you may not intercept directly the algorithm used by a computer, but only sources/results historic. A big list of initial numbers and what are their respective results through the algorithm.

As in your game, algorithms would surely be a lot more complicated than in my example, it would be impossible to a human player to directly guess it, or even for a simple machine.
So a system idea can be algorithm guess from this kind of list. Your levels would be easier with this improvement, because you can get algorithms directly from old initial numbers and passwords lists, that might be simpler to find than hashing programs.

And once again, this guess skill may have a level, and the higher it is, the less operations samples you need to find the algorithm.

## Cloud

Another idea that have no direct link with passwords but interesting on the system update point is to integrate or simulate computers in your system.

If your player is a super-computer, I suppose it is already a lot of machines clouded together. So an idea can be to start a level with limited resources (mainly CPU power and memory), but once you completely hacked a system, you can integrate it to your cloud, adding its memory and its CPU level to yours.

Memory can be used to store data: algorithms programs, computers historic, game elements like evidences (videos for instance), etc. If you don't have remaining, you cannot store anything more, and it can stuck you in a level, for instance if you don't have enough memory to compare enough algorithm operations in order to guess it.

CPU level can be used for automatic tests (see above), but also for DDOS. DDOS is a simple operation that spam a network system in order to make it crash, or at least, lag.
So you can use it to make a security system nonfunctional as long as the player maintain the DDOS, but it won't have enough CPU level at start to make it on every security system, of course.

## Virtual machine

Instead of integrate a computer to its system, you can have a "virtual machine" system improvement that do the opposite: use a part of your resources to "simulate" another computer.

Let's say for instance that you made a computer crash, but before succeed to gather every data on it. If you have enough resources, you can use a part of your CPU level and memory (as much as it had) to create a virtual copy of it, and use it for instance to pass firewalls that wouldn't allow your player but would allow recognized computers.

## Systems update

On that part, initial resources (CPU level and memory) are key to capacity. So a simple, reliable and realistic improvement would simply be to increase it directly on your computer location, and start the level with an increased level of resources.

• I like the idea of the password being generated by multiple computers, making the order important. This is much more like what it is in real life. My only problem is that I also intend to make an upgrade system, allowing (among other things) to improve and add abilities to your hacking system. Any further suggestions? – DJpotato Sep 29 '15 at 5:00
• @DJpotato I updated my question with systems update suggestions, and a new part on cloud ideas, that lead to systems update. – Aracthor Sep 29 '15 at 5:42
• Those last few ideas are terrific, I will definitely use the cloud idea, primarily as a way of expanding your in-level abilities, and the VM as well. DDOS attacks are a great idea, I might also make a virtual shell, which would allow you to hijack other computers. Thank you for your help – DJpotato Sep 29 '15 at 5:52

As someone who works for a company providing web based services with over a dozen servers, and protecting those servers against hackers, I can say that randomly guessing a password incrementally is a rather poor and inefficient way of going about hacking a system. Most systems log incorrect password attempts, and will lock the specified account or machine after so many incorrect attempts. Sometimes the lock may expire after X minutes, or it may stay locked until a system administrator unlocks it.

Most hacks these days are attempted against machines which are 'unsecured' or have a vulnerability in a piece of software installed - our company sees multiple attempts daily from hacking scripts pinging our servers and asking for common routes, usually trying to find the admin logon panel for common CMS (like Wordpress or Dupral). We run a custom CMS, so the admin logon exists elsewhere, so we throw 404 errors back at the hacking script.

Once a system has been identified, a hacker will then try and gain access through known vulnerabilities, such as targeting a Javascript resource which allows for code injection or a route which is known to be unsecured in unpatched versions. Or maybe sends data to a API on that service which doesn't require authorization and has a buffer overflow exploit which can be used to pass in malicious data to give the hacker system access. Or maybe its an open port that they can connect to (like an unsecured SSH channel)

Our company actually did end up having to re-secure an email server used by our clients that had been hacked (as we are the technology provider/maintainer), and that took several days to fix. Fortunately, there was no major damage apart from several thousand bouncebacks from spam emails clogging it up and blacklistings, but it did give me first hand knowledge of how hackers work, and how they exploit systems.

So Ideally, you'll want your automated hacking tool ingame to do several things.

1. Identify the target.
2. Identify what ports are open by pinging them (22 for SSH, 80 for HTTP, etc).
3. Identify what resources are being run (port 80, so we're looking for webservers, port 22, so we're looking for unsecured ssh ports).
4. Try and exploit known vulnerabilities that exist in common software used by the attack target to get in.
5. Gain access, and then configure the system to do what you want. Email server? Set up a spam bot. Company server? Steal user/company information. Joe Bloggs personal computer? Install rootkit/cryptolocker and then have him pay you to 'restore' his computer. Security system? Take control of cameras and electronic door locks. Also, change passwords/keys or wipe them to prevent people from getting in and stopping you.

As for an example from a game, while not completely realistic but probably is meant to work in a similar fashion to the approach described above by doing #1-4 automatically and then allowing you to do #5, you might want to look at Deus Ex: Human Revolution. Its hacking minigame requires you to use a 'Capture' program, which does what it says - it allows you to capture and gain access to locked personal computers to read emails, security systems to activate/deactivate cameras, security lasers turrets and robots, switch off alarm panels so guards can't use them to sound an alarm, etc.

In order to hack a system, you need to navigate a virtual file system, taking over different nodes and capture all critical nodes. However, each node carries with it a chance of detection, which may alert the security system to your presence, and will attempt to trace and remove you from the system. If caught, you get kicked out and the system goes into lockdown for 30 seconds. If you manage to avoid being caught and manage to secure all critical nodes before being caught, that system belongs to you. Sometimes you can also capture the security node, which counts as capturing all nodes, giving you all the rewards from the different node types.

Nodes include

• Directories (folders/nodes containing no useful information)
• Datastores (containing useful data received as XP usually or financial data received as ingame credits, sometimes one use hacking programs)
• API/Transfer/Spam/Access nodes (which affect other nodes in different ways - API makes all datastores easier to hack, Transfer makes one node easier to hack and another harder, spam nodes slow down the security trace and access nodes make the immediate nodes surrounding it easier to hack)
• Security nodes (which contain the enemy security system will will attempt to trace you and kick you out if it detects you)
• Critical nodes (which ultimately grant you system access).

However, some of the paths between nodes are one way, so there may only be a shortcut back towards from that the security system can use if triggered.

You can upgrade the program if you choose through the course of the game to make your hacks harder to detect (lowers security rating on nodes), allowing you to hack higher security systems, or improve the fortifying system which allows you to fortify individual nodes to slow down the security system if it detects you.

You can implement something similar in you game by requiring your hacking system to have different modules/upgrades/addons that allow it to attempt to hack different computers/software. You have to somehow acquire or improve these modules in order to hack different devices and gain access to them, or allow for easier hacking. You could have a similar web, which allows you to choose the route to take - do you take the longer route with many low ranked nodes and thus more (low) chances of detection, or the shorter route with 2 higher ranked nodes (that will most likely alert the security system on one of them) to the objective? And if the security system detects and starts tracing you, do you continue to try and get that datastore like node down the dead end, or focus on capturing the system to stop the trace and possibly prevent an alarm from sounding?

• SSH remote Logins, I will definitely be using that to access computers. Until now I hadn't thought of having a hacking system which goes beyond brute-forcing passwords to gain access to cameras and doors, but I think I will incorporate some kind of two-stage hacking system: Basic, for individual cameras and doors; and Advanced, for computers, which is what you described. Thank you very much – DJpotato Sep 29 '15 at 6:27
• And for security cameras/doors, you could access a local website (eg 192.168.12.34:80/cameras) because believe it or not, that how cameras connect to their security server. Same thing with routers and many smart appliances these days (TV, fridges, etc). Determine what model/make of camera there is, and start the hacking program to target its central server. And if you are feeling truly evil, hack their smart fridge to deactivate the cooling system and spoil the milk used for their coffee when they come in the next day. – Seta Sep 29 '15 at 6:44