What is a Remote Access Trojan (RAT) & How To defend against It

What is RAT?

A RAT is a form of malware that lets attackers track and control your machine remotely.

How to defend against RAT?

  • Use anti virus.
  • Download softwares using safe and official links over a secure protocol. Prefer to download a signed image of the software to make sure there is no changes made in the software while in transit.
  • Dont open unknown email attachments & links.
  • Keep your browser and operating system up-to-date with security patches.

 

What is Insider Threat & How To defend against It

What is Insider Threat?

Employees, former employees, contractors, or business associates who have legitimate access to your systems and data but can use that access to kill or steal your data or systems are known as insider threats. Insiders may turn malicious for a variety of reasons, such as revenge, manipulation, ideology, ego, or monetary benefit via intellectual property theft.

How do I prevent a Insider Threat?

There are a variety of ways to defend yourself from malicious insiders, depending on the organization, systems, culture, environment, and how well this information is communicated and understood by employees.

 Technical Controls:

  • Control removable storage
  • Control outbound emails and files
  • Backups
  • Require strong passwords and multi-factor authentication
  • Recycle your old hardware and documentation properly (Remove all data before recycling)

 Access Controls:

  • Implement concept of least-privileged access
  • Use unique logons
  • Deactivate unnecessary access
  • Implement Auditing and logging
  • Establish physical security in the work environment
  • Enforce separation of duties

 Business Processes:

  • Do a comprehensive background check before hiring any IT admins because they have powerfull administrative access
  • Staff training
  • Improve work culture
  • Enable surveillance

What is a Ransomware & How to Defend Against It

What is a Ransomware?

Ransomware is a form of malware that encrypts a victim’s data. The attacker then asks for ransom. Once the ransom is paid the the user access to data is restored..

How to defend against Ransomware?

  • Keep your operating system patched and up-to-date.
  • If you don’t know what you’re doing, don’t install software or grant it administrative rights.
  • Use antivirus software.
  • Back up your files, regularly and automatically. Even though this will not prevent you from an attack, it will significantly reduce the harm it does.

What is Cross-Site Scripting (XSS) & How to Defend Against It

What is XSS?

XSS is a type of injection which if successful, allows an attacker to run scripts on the victim’s machine. A web-app is vulnerable, if it uses unsanitized user input.

There are three main XSS types:

  • Stored XSS: This is the most dangerous type of XSS. This is where a malicious string originates from the website’s database.
  • Reflected XSS: This payload is part of the victims request to the website. The website includes this payload in response back to the user.
  • DOM-Based XSS: DOM (Document Object Model) is a programming interface for HTML and XML documents. It represents the page so that programs can change the document structure, style and content.

How to defend against the Broken Access Control?

Using frameworks that automatically escape XSS by design.
Escape mistrusted HTTP request data.
Apply context-sensitive encoding when modifying the browser document on the client side.
Enable a CSP (Content Security Policy).

 

What is Security Misconfiguration & How to Defend Against It

What Security Misconfiguration is?

Security misconfigurations are when security could have been configured properly but was not, and can happen at any level of an application stack. Automated scanners are useful for detecting the misconfigurations.Often this Vulnerability give attackers unauthorized access to system data, sometimes can end up in a complete system compromise.

Security misconfigurations often include:

  • Poorly configured permissions.
  • Having unnecessary features enabled.
  • Out of date web applications
  • Insufficient firewall protection
  • Default configurations (default accounts and default passwords).
  • Overly detailed error messages.
  • Unencrypted files

How to defend against the Security Misconfigurations?

  • Remove any unnecessary features.
  • Regularly patch your systems and use up to date softwares.
  • Use strong and complex passwords
  • Use strong ACL (Access Control List) and other permissions.
  • Design the error messages (such as the error 404 page).
  • Use strong encryption protocols
  • Verify the effectiveness of the configurations and settings in all environments.

What is Broken Access Control & How to Defend Against It

What is Broken Access Control?

Broken Access Control is exploitation of access control, which is a primary skill of an attacker. The broken access control allows attackers to bypass authorization which can allow them to view sensitive data or perform tasks as if they were a privileged user. Access control weaknesses are common because of the lack in detection and the lack in effective functional testing by the developers. The attack if executed successfully, it does not have a limitation on the impact since based on the access that has been bypassed, the attacker might be able to read or modify the data.

How to defend against the Broken Access Control?

  • With the exception of public resources, deny by default.
  • Implement unified access control model and re-use it.
  • Model access controls should enforce record ownership.
  • Implement unique application business limit requirements as per the domain models.
  • Disable web server directory listing.
  • Deny access to backups and other sensitive data.
  • Implement Logging and detection.
  • JWT (JSON web tokens) should be cancelled on the server after logout.
  • Developers and QA (Quality Assurance) staff should include functional access control unit and integration tests.

 

What is XXE (XML External Entities) & How to Defend Against It

What is XXE?

XXE is where an attackers can exploit a vulnerable XML processor (file that reads and processes the XML), if the attacker can upload a payload in the form of XML document, can cause problems (such as it can allow the attacker to communicate to the system that the server is connected to and read data that is not for the users, cause the DOS (Denial Of Service) attack or may make changes in the configuration to allow port scanning or port opening which can then give them the option for RCE (Remote Code Execution))

Types of XXE attacks:

1) In-band XXE attack:
The in-band XXE attack allows the attacker to receive a response to the XXE payload.
2) out-of-band XXE attacks (also called blind XXE):
The blind XXE attack does not receives an immediate response from the web application.

How to defend against the XXE?

  • Developer training.
  • Use less complex data formats.
  • Patch or upgrade all XML processors and libraries.
  • Disable XXE processing in all XML parsers.
  • Whitelist server-side input validation, filtering, or sanitization.
  • Verify that XML file upload functionality validates incoming XML data.
  • Use virtual patching, API security gateways, WAF (Web Application Firewalls) to detect, monitor, and block XXE attacks.

 

What is Sensitive Data Exposure & How to Defend Against It

What is Sensitive Data Exposure?

Sensitive Data Exposure is when a web application reveals the sensitive data (often user information). this often happens when the web-app is either using weak encryption or no encryption at all and involve attacks such as MITM (Man In The Middle) attack, which means that the attacker intercepts the connection between the user and the server or forces the user connection through a they have access to. Sometimes the sensitive data is available on the web-server itself. If this vulnerability is exploited, it reveals the sensitive data (aften PII (Personally identifiable information)), which then often require response as defined by the Laws or regulations.

How to defend against the Sensitive Data Exposure?

  • Classify your data, whether it is sensitive or not.
  • Apply controls as per the classification.
  • Don’t store sensitive data unnecessarily.
  • Encrypt all sensitive data at rest.
  • use up-to-date and strong algorithms, protocols, and keys.
  • Encrypt all data in transit with secure protocols such as SSL/TLS with PFS (perfect forward secrecy) ciphers, cipher prioritization by the server. Enforce encryption using directives like HSTS (HTTP Strict Transport Security) and using HTTPS.
  • Disable caching for response that contain sensitive data.
  • Store passwords using strong adaptive and salted hashing function.
  • Verify the effectiveness of configuration and settings.

What is Broken Authentication & How to Defend Against It

What is Broken Authentication?

Authentication and session management are the core of modern web applications. While authentication is used to allow the verify a user and let them login to their accounts, Cookies are used as a tool for session management. A user will login using their credentials (Most common form of authentication), and then the user is assigned a cookie. A cookie is used to keep track, since the web protocol HTTP & HTTPS protocols are state-less (which means that the servers will not remember whether a client has or has not used the application before, and how many time).

Common fault in the authentication which causes it to break are:

  • Brute force: Brute force attacks means that an attacker guesses the username and passwords in multiple login attempts.
  • Weak passwords: Weak passwords means to have common or easy to guess password (Such as “password” or “admin”).
  • Weak session Cookies: Weak session cookies means if the session cookies used have predictable values in them, the attacker can set custom session cookies and access user accounts.

How to defend against the Broken Authentication Attacks?

  • Use a strong password policy to avoid password guessing.
  • Use a user account lock out strategy to avoid the brute force attack.
  • Use MFA to stop the terminate the single point of failure in the authentication system.

What are Brute-force Attacks & How to Defend Against Them

What are Brute-force Attacks?

A brute-force attack means to figure out a password by trying possible combination of letters, numbers, and symbols unless you find a combination that works. Depending on the password’s length and complexity, the process can take a long time, and you get unnecessary traffic. To speed up the process, an attacker ussually uses an attack known as dictionary attack, where they use the dictionary words or some midified version of those words. The attackers can also automate this process by using a tool like “Hydra”, “Hashcat”, or their custom scripts. Attacks like these are fairly easy to detect but if defended against them they could result in a catastrophe (For example if an admin account is compromised, or even if a standard user account is also compromised it can allow the hacker to laterally move in the network).

How to defend against Brute-force Attacks?

Strong passwords:

This means to make sure that users are using strong passwords: long unpredictable passwords, avoid reusing passwords, and change passwords regularly.

Account lock-out:

Account lock out means, after a defined number of incorrect login attempts the account will automatically get locked (For example the account can get lock for 30 seconds after the second attempt, 1 min and the 3rd and 4th attempt, and after the 5th attempt it, locks out and needs manual unlocking by an administrator).
The problems with account lockouts are:

  • An attacker can cause a denial of service (DoS) by locking out large numbers of accounts.
  • Because you cannot lock out an account that does not exist, only valid account names will lock. An attacker could use this fact to harvest usernames from the site, depending on the error responses.
  • An attacker can cause a diversion by locking out many accounts and flooding the help desk with support calls.
  • An attacker can continuously lock out the same account, even seconds after an administrator unlocks it, effectively disabling the account.
  • Account lockout is ineffective against slow attacks that try only a few passwords every hour.
  • Account lockout is ineffective against attacks that try one password against a large list of usernames.
  • Account lockout is ineffective if the attacker is using a username/password combo list and guesses correctly on the first couple of attempts.
  • Powerful accounts such as administrator accounts often bypass lockout policy, but these are the most desirable accounts to attack. Some systems lock out administrator accounts only on network-based logins.
  • Even once you lock out an account, the attack may continue, consuming valuable human and computer resources.

Device based lock-out:

This means locking out authentication attempts from known and unknown browsers or devices separately based on the information collected (via the cookies, locations or IP addresses).

Using CAPTCHAS:

CAPTCHAS are helpful to stop those automated attacks which means that the attacker will need to login manually which can take a long time, and the team has time to work on the recovery measures once alarmed.

How to find out if there has been a brute-force attempt?

  • Many failed logins from the same IP address
  • Logins with multiple usernames from the same IP address
  • Logins for a single account coming from many different IP addresses
  • Excessive usage and bandwidth consumption from a single use
  • Failed login attempts from alphabetically sequential usernames or passwords