How to create a virus in NAV? (Part 1/2)

deadlycyberThe goal of this post is to show an interesting way of handling code in the 3-tier architecture. It is not meant to generate problems in customer systems and the full source code will not be shared.

 

A computer program is considered to be a virus, if the following applies:

  1. hides itself
  2. executes code that you are not aware of
  3. spreads itself across your system(s)

These are three important attributes that look to be hard to achieve in NAV. Let’s have a look at these points with the eye of a NAV technical expert.

How to hide business logic from a NAV developer?

It’s very difficult. The point is, if you write your code in C/AL, you access this code and you save this code in the development environment. You can, of course, use a protected range of objects (like for add-ons, for example), but this doesn’t mean this code is hidden.

There are developers who created the code. So they have the licence. So the code will not be hidden from the eyes of the developers.

So the point is, again: the logic/the code is there, but maybe you should look for it somewhere else.

How to execute code that you are not aware of?

It’s also not an easy deal. You are executing business logic in NAV, you are coding it in NAV –> you can see it in the development environment.

How to spread the “infection”across your systems?

Or, in other words, how do you start the “infection”? This would mean, that somehow, there is a starting point, a system gets infected. And after that, other NAV systems get infected and the infection spreads.

In NAV, this would mean, that the code that is being executed in one system is copied, undercover, to another NAV system and it’s executed there as well.

These are the technical aspects/questions raised by the idea of writing a virus in NAV. In the next post, I will describe, how I got through all these points. This is not something you would just download and start to use, but it gives you an insight how the development environment and the 3-tier architecture work together.

Unknown's avatar

Author: hejnav

My name is Attila Gajdos, I'm a Dynamics NAV/AX enthusiast. I just like to express my thoughts about business and ERP using the Microsoft ERP/BI product stack.

Leave a comment