Skip to content

What is SQL Injection and How to Prevent This Attack?

SQL Injection is one of the most dangerous vulnerabilities for websites and online applications. It occurs when a user adds untrusted data to a database query, for example, when filling out a web form. 

If data injection is enabled, attackers can create user input to steal valuable data, bypass authentication, or corrupt records in your database.

 There are different types of SQL injection attacks, but in general, they all have a similar cause. Untrusted data that the user enters is concatenated with the query string. 

Therefore, user input can change the original intent of the query and lead to numerous security issues

In this article, we cover and recommend some best practices for technicians to use in preventing SQL Injection attacks. Keep reading and understand more about these practices! 

Do Not Rely on Client-side Input Validation

Client-side input validation is an excellent practice to prevent SQL Injection attacks. With client-side input validation, you can now prevent invalid information from being sent to your system logic. However, this only works for users who have no bad intentions and want to use the system as designed. 

Providing the user with direct feedback that a certain value is not valid is very useful and simple. Therefore, you should use client-side validation to help your user experience. 

When looking at SQL injection, this is not a method you should trust. You can remove client-side validation by changing some Javascript code loaded in your browser. 

Also, it is very easy to make a basic HTTP call to the backend in a client-server architecture with a parameter that causes an SQL injection. Maybe using tools the old-school curl commands.

You should validate the server-side, preferably as close to the source as possible. In this case, you create the SQL query. Anything a client sends you should be considered potentially harmful. So, in this case, relying on client-side validation for SQL injection is a terrible idea.

Use Database Engines With Restricted Privileges

When creating a database user for your application, you should think about this user’s privileges.

Does the application need to be able to read, write and update all databases? How about truncating or dropping tables? If you limit your application’s privileges on the database, you can minimize the impact of SQL injection. 

It is advisable not to have a single database user for your application, but to create multiple database users and connect them to specific application roles with different privileges. Security issues are likely a ripple effect, so you should be aware of all relationships to avoid heavy damage.

Use Ready-made Instructions and Query Parameterization

Many languages have built-in features available that help prevent SQL injection. When writing SQL queries, you can use something like a ready-made statement to compile the query. 

With a ready-made statement, we can perform query parameterization, which is a technique to dynamically create SQL statements. You create the base query with some placeholders and securely attach user-supplied parameters to those placeholders.

When using a real ready-made statement and parameterized queries, the database itself actually takes care of the escape. First, it builds the query execution plan based on the query string with placeholders. 

In the second step, the (untrusted) parameters are sent to the database. The query plan is already created, so the parameters no longer influence this. This avoids the injection completely.

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 Segura®
Segura® strive to ensure the sovereignty of companies over actions and privileged information. To this end, we work against data theft through traceability of administrator actions on networks, servers, databases and a multitude of devices. In addition, we pursue compliance with auditing requirements and the most demanding standards, including PCI DSS, Sarbanes-Oxley, ISO 27001 and HIPAA.

My Company Suffered a Ransomware Attack: Should I Pay the Ransom or Not?

Ransomware attacks are one of the biggest fears of companies today. Imagine having to use your business resources to pay cybercriminals. This is a reality that happens.

However, in case your company suffers a ransomware attack, what is the best option: To pay or not to pay the ransom? That is exactly what we will talk about in this article.

Keep reading and understand how to handle this type of situation.

What is a Ransomware Attack?

A ransomware attack consists of blocking data from computers and servers through encryption.

The hacker blocks this data and demands the payment of the ransom through a type of digital currency, such as Bitcoin.

The promise made is that the data will only be released when the ransom is paid.

How Does a Ransomware Attack Work?

One of the biggest risks to a company’s information security is cyberattacks, as hackers are aware of possible system security flaws due to data transfer between the various devices connected to the server.

The moment a hacker identifies a security loophole in the system, they prepare their attack.

As far as ransomware is concerned, computer files are encrypted and ransom is requested for the data to be released again.

It is possible to fix these flaws before hacker attacks happen through system updates, but this does not always happen in a timely manner and hackers are usually quite quick in their actions.

One of the ways to avoid ransomware is to keep operating systems always up-to-date, as malware easily invades when it perceives a system failure.

Another way ransomware attack can happen is through phishing which, in practice, occurs through an email sent with a strange attachment or code to your inbox.

This email arrives disguised as a known sender, such as an employee of the company itself, causing a person to open the attachment without so much suspicion.

By clicking on such an attachment, the virus gains access to all computers and devices connected to the system and the ransomware begins to encrypt the files until they are all taken “hostages”, and remain so until the desired payment is made to the cybercriminals.

It is important to mention that, although the hacker promises to release access to the data after payment, this may not happen, as these people are not trustworthy to simply believe their words without guarantees.

Also take the opportunity to read: The pillars of information security: part 2

Learn How to Handle a Ransomware Attack

In case a ransomware attack happens in your company, you must immediately notify the IT team who will be responsible for finding the last backup performed on the system.

When it occurs at home, the ideal is to disconnect the computer from the network and look for a professional who is an expert in information security to help you solve the problem.

One of the ways to protect yourself from these hacker attacks is to have an antivirus in your system, always kept up to date, in addition to performing regular backups of your data, preparing for possible losses in the future.

To Pay or Not to Pay for a Ransomware Attack?

Experts on the subject defend the idea that not paying for ransomware attacks is the best option because, as already mentioned, cybercriminals offer no guarantee that they will release the data later.

In some cases of this malware, it is entirely possible to solve the problem with the use of a good antivirus, for example.

When it comes to recovering data such as personal photos, legal documents, medical reports, and such, you must decide between the risk of paying and getting them back or not.

In the end, the most appropriate way to avoid these hacker attacks is to keep your system constantly protected by antivirus and security tools that cover cyberattacks like this one.

Furthermore, it is important to keep backups always up to date and your data stored in the cloud as another secure way to protect yourself.

It is worth noting that making payment for this type of hacker attack may even be considered illegal, as threats to sell or disclose confidential information on the dark web is a form of extortion, which is a crime under the law, as reported on Welivesecurity.

This is one of the cases where relying on a company that specializes in digital solutions becomes essential for good performance and data security in your company.

Was this content useful for you? Also read: Is Your Company Really Prepared for a Cyberattack?

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 Segura®
Segura® strive to ensure the sovereignty of companies over actions and privileged information. To this end, we work against data theft through traceability of administrator actions on networks, servers, databases and a multitude of devices. In addition, we pursue compliance with auditing requirements and the most demanding standards, including PCI DSS, Sarbanes-Oxley, ISO 27001 and HIPAA.

How Do Pass-the-hash Attacks Work?

Despite being something old, from the 1990s, few people know how pass-the-hash attacks work.

Keep reading the article to find out!

Where Did the Name “Pass-the-hash” Come From?

Pass-the-hash attacks occur when an attacker steals a user’s credential with a hash function.

Without “breaking” this function, the attacker reuses it to trick an authentication system into creating a new authenticated session on the same network.

For those who are not aware of it, a hash function is any algorithm that maps large, variable-sized data to small, fixed-sized data.

Hash functions are widely used in order to verify the integrity of downloads, search for elements in databases, or transmit and store passwords.

Hence the “pass-the-hash” name, which literally means this—exactly what attackers do through this attack.

How Are Pass-the-hash Attacks in Information Technology Classified?

Pass-the-hash attacks are primarily a lateral movement technique.

This means hackers are using the hash to extract additional information and credentials after they have already compromised a device.

By moving “sideways” between devices and accounts, attackers can “pass the hash” to get all the correct credentials from someone else.

With this, they can eventually “scale up” their domain privileges and access more influential systems, like an administrator account on their personal computer, without even needing their password.

Another interesting fact is that most of the movement performed during a pass-the-hash attack uses a remote software program, such as malware.

What Operating Systems Do Pass-the-hash Attacks Work On?

Typically, pass-the-hash attacks target Windows systems.

However, they can also work against other operating systems, in some cases on any authentication protocol such as Kerberos.

Windows is especially vulnerable to these attacks because of its single sign-on function.

This function allows users who, by entering the password only once, can access all the features they want.

The single sign-on function also requires users’ credentials to be cached on the system, making it easier for attackers to access.

That is one of the reasons why it is so important to know the 7 Tips to Prevent Cyberattacks While Remote Working.

How Do Pass-the-hash Attacks Work?

To perform a pass-the-hash attack, the attacker first obtains the hashes of the targeted system using any number of hash dump tools, such as fgdump and pwdump7.

The attacker then uses these tools to place the obtained hashes into a Local Security Authority Subsystem Service (LSASS).

Pass-the-hash attacks are often targeted at Windows machines due to the security vulnerability of NTLM (New Technology Local Area Network Manager) hashes once administrator privileges have been obtained.

These attacks often trick a Windows-based authentication system into “believing” that the attacker’s endpoint is the legitimate user’s endpoint.

Thus, the system automatically supplies the necessary credentials when the attacker tries to access the targeted system.

And all this can be done, as already said, without the need for the original password.

The key used by attackers to perform these types of attacks is the NTLM hash, which is nothing more than fixed-length mathematical codes derived from passwords.

NTLM hashes allow the attacker to use compromised domain accounts without extracting the password in plain text.

This is because computer operating systems such as Windows never actually send or save user passwords on their network.

Instead, these systems store passwords as encrypted NTLM hashes, which represent the password, but cannot be reverse-engineered.

NTLM hashes can still be used in place of a password to access various accounts and resources on the network.

For an attacker to be able to access LSASS, they must successfully compromise a computer to the point where the malware can run with local administrator rights.

Therefore, this is one of the biggest obstacles to pass-the-hash attacks. And knowing how to securely control your privileged accounts with PEDM is another big obstacle, too.

Once a Windows-based machine is compromised and the deployed malware is given access to local usernames and NTLM hashes, do you know what happens?

The attacker can even choose whether to get more credentials or try to access network resources using privileged user credentials.

By gathering more user credentials, an attacker can retrieve the credentials of users who have separate accounts on the Windows machine, such as a service account, or who still have remote access to the computer with an administrator login, for example.

Remote information technology (IT) administrators connecting to the compromised Windows machine will expose their NTLM username and hash to the now-integrated malware.

An attacker with IT administrator credentials can then move “sideways” across networked devices.

The “lateral movement” is an effective way to search for users with elevated privileges, such as administrative rights to protected resources.

Privilege escalation can be achieved by locating the credentials of an administrator with greater administrative access.

These elevated features can also include access to customer databases and email servers.

What Can Pass-the-hash Attacks Do to My Computer?

Because this type of attack exploits the features and capabilities of the NTLM protocol, the threat can never be completely eliminated.

Once an attacker compromises a computer, pass-the-hash becomes just one of the malicious activities that can be performed.

A 2019 study found that 95% of its 1,000 respondents experienced a direct business effect from pass-the-hash in their organizations.

About 40% of these attacks resulted in lost revenue and 70% incurred increased operational costs.

No wonder that many IT experts consider pass-the-hash attacks to be among the top cybersecurity vulnerabilities in Industry 4.0.

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 Segura®
Segura® strive to ensure the sovereignty of companies over actions and privileged information. To this end, we work against data theft through traceability of administrator actions on networks, servers, databases and a multitude of devices. In addition, we pursue compliance with auditing requirements and the most demanding standards, including PCI DSS, Sarbanes-Oxley, ISO 27001 and HIPAA.

Ransomwares are everywhere: get to know this trend (and #stopransomwareattacks!)

When it involves ransomware protection, it is better to be safer than sorry, isn’t it? To achieve this goal, a vigilant outlook and the right security software are essential, since a moment of carelessness is enough to fall victim to a cyberattack.

You probably know what ransomware is, but it is worth remembering: it is a type of extortion malware that can lock down your computer and then demand a ransom to return the operating systems. In May 2017, for example, the WannaCry variant spread around the world and reached more than 100 million users, claiming some major victims, such as the UK’s National Health Service (NHS). It infected more than 230,000 computers in 150 countries in just one day.

Since then, ransomware has spread around the world, with new types and new hits, and with that, cybersecurity solution makers have increasingly focused their actions on preventing attacks by this “pirate” of nowadays. And to support the fight against this increasingly frequent cybercrime, we launched the #stopransomwareattacks campaign on our social networks, with the aim of raising awareness among IT professionals and society about the variety of ways this malware appears on operating systems and the risks caused by a simple click.

What are the kinds of attacks?

The forms of attacks are diverse: ranging from messages about unlicensed applications to false claims about inappropriate content, in some cases resulting in the payment of fines or the need to restore devices to factory settings.

From the most aggressive to the most imperceptible forms, some of the main ransomware variants are:

Petya: It goes beyond hacking into files and can bring the entire system to a halt, causing devastating results.

zCrypt: It does not attack files directly; it acts like a classic virus, acting on recently handled files to boost the impact.

Jigsaw: This attack begins with a simple greeting message, followed by a ransom demand, threatening the victim with the removal of all their data within 72 hours.

Wannacry: The infection by this ransomware was indeed a global epidemic, scaring everyone and causing companies and government agencies to rush to seek protection solutions. The losses caused by this malicious software are estimated to have totaled $4 billion worldwide.

Ransomware, in all its forms and variants, represents a significant threat to both independent users and enterprises. That’s why it’s even more important to be aware of the threats it portrays and be extra careful in eventualities. 

Join the #stopransomwareattacks campaign! Post pictures on your social media networks with signs written with the hashtag, tag senhasegura’s profile and share with friends… Let’s stop the dynamics of malicious activity!

If you want to know more about how ransomware acts on a system, senhasegura will promote the webinar “Dissecting Ransomware Attack – Protecting your Company Accesses” on the October 26th at 3pm (CET), with a live demonstration by Cybersecurity Researcher, Filipi Pires, and by senhasegura’s System Analyst, Gabriel Oba, who will clarify all doubts with a highly conscious approach to the use of devices and what is the adequate product to mitigate the risks of this type of malicious attack. 

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 Segura®
Segura® strive to ensure the sovereignty of companies over actions and privileged information. To this end, we work against data theft through traceability of administrator actions on networks, servers, databases and a multitude of devices. In addition, we pursue compliance with auditing requirements and the most demanding standards, including PCI DSS, Sarbanes-Oxley, ISO 27001 and HIPAA.

Windows Print Spooler Failure: Why Should I Upgrade Immediately?

Updating the operating system is a common activity. However, in July 2021, one of Microsoft’s Windows updates gained prominence.  

Let’s talk about it: Windows print spooler failure: why should I update immediately?

What is Print Spooler Failure?

The print spooler is one of the Windows operating system components. Its purpose is to allow the exchange of information between computer and printer, as well as ordering the queue of documents that must be printed.

When this tool has a failure or there is a communication error between software and hardware, prints are not made.

Generally, these errors do not imply major security holes. However, the online disclosure of the flaw known as PrintNightmare sparks warning signs.

What is PrintNightmare?

PrintNightmare means exactly that. It has become known as a serious security hole in Windows print spooler.

Through this loophole, hackers can use the print spooler and its high level of access within Windows to completely control the computer.

With this, they can access any information, control programs and applications already installed, modify documents and folders, create new user accounts, and even install new apps. All this without the user having any control.

The print spooler failure does not only affect the latest versions of the Microsoft operating system. In fact, it can be exploited on computers with older versions, and even newer versions such as Windows 7.

If this error has been around for so long, why have updates been released to fix it just now?

Data security is essential to a company’s operations. Both protecting strategic information and customer data. Learn if your company is prepared for a cyberattack.

Print Spooler Failure Disclosure

The codes referring to this failure were released on the internet even before Microsoft experts were aware of the existence of the error.

Researchers at Sangfor Technologies, a Chinese company that works with network security systems, discovered this error and made a Proof of Concept (PoC), which is a hands-on exercise. It is used as documentation during the process of recognition, diagnosis, and correction of faults made by developers, whose goal is to demonstrate the feasibility and forms of a certain attack on a system.

Thus, the PoC created by Sangfor ended up being put online, as the researchers believed that the error had been resolved. When it was determined that Microsoft was not aware of the flaw, the information was taken down.

However, the PoC information ended up being posted on GitHub (a programmer’s social network that also serves as an information repository) before the fix was made available. Thus, sensitive data was available so that it could be analyzed and possible attacks planned.

According to Microsoft itself, the information regarding the print spooler failure and PrintNightmare have been used to carry out real attacks on computers using the Windows operating system.

Faced with this problem, Microsoft was forced to fix the errors quickly and release a new system update. It was released on July 6, 2021 and, according to the company, it is available for Windows 10, 8.1, and 7.

The company recommends that all Windows users immediately update their operating system in order to prevent the invasion of hackers through the print spooler failure.

How to Update Windows Operating System?

Normally, the Windows operating system is configured to automatically update the system. However, it is not uncommon for this function to fail.

Manually updating your Windows operating system is quite simple. Just access the settings through the Start Menu and click the icon referring to Updates and Security. Then click on the Windows Update tab and request to update the system.

For Windows 10, the update that fixes the print spooler failure is designated as follows: KB5004945. Once the update has been downloaded, simply restart your computer for the updates to install and the problem to be fixed.

senhasegura aims to maintain the security of information, acting against data theft and ensuring the sovereignty of companies over their information.

Visit our website and schedule a demonstration of our products.

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 Segura®
Segura® strive to ensure the sovereignty of companies over actions and privileged information. To this end, we work against data theft through traceability of administrator actions on networks, servers, databases and a multitude of devices. In addition, we pursue compliance with auditing requirements and the most demanding standards, including PCI DSS, Sarbanes-Oxley, ISO 27001 and HIPAA.