The game is still quite new and players are still trying to discover how the game works exactly. Well Love.Wolf and Wakaka took it a step further and actually did some experiments on attack priorities.
The wiki (http://hackersthegame.wikia.com/wiki/Attack_Strategies) explains the attack priorities quite well. In this guide I will mostly explain the linking order mechanics and the different node types to better explain the wiki article.
Why is this in the network architecture section? So that we can understand what nodes will be attacked first when the attacker has multiple nodes to choose from.

With this knowledge, we can start baiting with nodes and know exactly which nodes will be taken down in which order.
Linking order
Before we get started on priorities, there is an import factor that we must explain first. That is: The order in which you link your nodes matters.
See the bubbles under each node? Take the core for example. It has 5 linking nodes represented by those bubbles:

Each link is very important as it determines which nodes will be attacked first (after some general rules). Firstly, here's how you know which link is which.
So we start of with our core with 5 links. We first link it up to a black ICE (or what ever node):

That's the first link made.
If you link up another black ICE to the core:

That's the second link made.
If you link up a turret to the core now:

That's the third link made.
Keep the link numbers in mind throughout this guide as they play a big part in priorities.
Types of nodes
When deciding on which node to attack, the nodes are categorised into groups/classes
- Defence nodes (Nodes that begin black: Sentry, turret, black ICE)
- White passive nodes (Nodes that begin white: This includes scanners, guardians and code gates... and the others like library, evolver, farms etc.)
- Partial AV (anti-virus) passive nodes. These are passive nodes that are half black because the AV is getting uploaded.
Notice the half black half white bottom - Full AV passive nodes. Passive nodes with AV uploaded and have become fully black
- Wraithed nodes. Nodes that have been disabled. This includes both defence and passive nodes
- Building/upgrading nodes. Self explanatory...
Attack priority
Now that we understand the language from Love.Wolf's report, we can take a look at the priorities and attack order
So taken from Love.Wolf's report
Love.Wolf wrote:Summary:
1) The Order you link nodes is what determines the order the nodes are attacked.
2) Defensive nodes (Black Nodes - Sentry, Black Ice, Turret) will always take priority over Passive nodes (White Nodes).
3) Passive Nodes with AV (turned Black) will take priority over normal passive nodes (White Nodes).
4) Passive Nodes with Partial AV (Partially Black) will take priority over normal passive nodes (White Nodes).
5) Passive Nodes with AV are NOT treated as defensive nodes.
6) Wraithed and Upgrading nodes have the lowest priority always.
The only thing incorrect here is the upgrading nodes part (yet to be updated). Upgrading nodes have no effect i.e treated as what they would normally be without the building thread.
Candourlight (in discord) wrote:I've noticed upgrading security nodes take precedence over functional ones at times
E.g my beams prioritised an upgrading ICE over a turret
Lada aka LadTy (in discord) wrote:"Wraithed and Upgrading nodes have the lowest priority." - im not actually sure about itwraithed yes upgrading idk, maybe it's just that these dont get filled up by AV (for the passive ones) which makes them attacked last."
So to wrap it up, the order is:
- Defence nodes (Sentries do not have higher priority contrary to popular belief. Code gates, scanners, and guardians are not considered as "defence nodes")
- The core (Source: Wiki)
- Full AV passive nodes
- Partial AV passive nodes
- White passive nodes
- Wraithed nodes
If they fall in the same category...
Then this is when the ordered links comes to play. Link 1 > link 2 > link 3 etc. Meaning that link 1 would get attacked first (assuming all links fall into the same category). Remember that this ONLY happens when they fall into the same group. Groups > ordered links
Conclusion
Now that we understand how attack priorities work, we can understand exactly how our base is going to get attacked. Now we can set up traps, tanking nodes and baiting nodes with full confidence.
Special thanks
Love.Wolf and Wakaka for experimenting on this
Love.Wolf (again) for writing up a full report on the experiment... because I couldn't be bothered to read 400+ messages on discord. Report can be found here: http://pastebin.com/JEygg4C6
Candourlight and LadTy for confirming and fixing building nodes section
This discord group for coming up with this idea and supporting it: https://discord.gg/qquYZ6H <-- join us!
EDIT: Keep in mind this is just one experiment. Like many things in this game, this info may be subject to change. If you have any experiments or proof that this is incorrect, reply down below or join our discord channel to discuss
EDIT: Added core priority and wiki reference