About CVE-2021-39656 (Android), are you interested to know? (15-12-2021)

Preface: The biggest advantage for Android is actually in hardware, not software. The best part of Android platform is that it is flexible in accommodating third party applications which facilitates the Android user to add more functionality in his/her mobile device.

Background: Configfs is a ram-based filesystem that provides the converse of sysfs’s functionality. Where sysfs is a filesystem-based view of kernel objects, configfs is a filesystem-based manager of kernel objects, or config_items.

Both sysfs and configfs can and should exist together on the same system. One is not a replacement for the other.

Privileged or kernel mode is the processing mode that allows code to have direct access to all hardware and memory in the system. Kernel mode means when any process or program wants to use any functionality controlled by Operating System, so in that case,
we make a system call to execute any particular set of instructions stored in O.S. So these set of instructions are executed in Kernel mode.

Vulnerability details: About CVE-2021-39656, .The remedy was completed in March 2021. This week’s CVE record provides a summary (see below):

In __configfs_open_file of file[.]c, there is a possible use-after-free due to improper locking. This could lead to local escalation of privilege in the kernel with System execution privileges needed.

Remedy: To fix this issue, remove the config_item_put in __configfs_open_file to balance the refcount of config_item. Please refer to the attached picture for details.

Official announcement: https://android.googlesource.com/kernel/common/+/14fbbc8297728e880070f7b077b3301a8c698ef9

CVE-2021-42064 Unpublished bug, under circumstances, it exposing the backend DB (14th Dec, 2021)

Preface: The Oracle 10g limitation of 1000 items in a static IN clause. How do you increase maximum number of expressions in a list is 1000 in Oracle? Any in statement like x in (1,2,3) can be rewritten as (1,x) in ((1,1), (1,2), (1,3)) and the 1000 element limit will no longer apply.

Background: SAP Commerce organizes data like product information to be propagated using multiple communication channels in a consistent and efficient way. This enables businesses to sell products across multiple distribution channels. ORA-01792 error message alert that maximum number of columns in a table or view is 1000 on remote DB, this is a unpublished design limitation.

Vulnerability details: If configured to use an Oracle database and if a query is created using the flexible search java api with a parameterized “in” clause, SAP Commerce – versions 1905, 2005, 2105, 2011, allows attacker to execute crafted database queries, exposing backend database. The vulnerability is present if the parameterized “in” clause accepts more than 1000 values.

Observation: Backend is consists of the server which provides data on request, the application which channels it, and the database which organizes the information. If attacker known the details, it let them easier to do the SQL injection.

Official details: For more details, please refer to the link – https://wiki.scn.sap.com/wiki/display/PSR/SAP+Security+Patch+Day+-+December+2021

Kronos hot with ransomware, even though we do not know the reason. However, the original has weakness (14-12-2021)

Preface: In October 2020, two of the largest human resources (HR) technology vendors out there—Kronos and Ultimate Software—merged into UKG (Ultimate Kronos Group). Together, the two companies now bring customers more than 70 combined years of experience in the industry.

Background: Kronos’ system integration capabilities has compatibility because it accept CSV format of file as import data source. The integration is done via a comma delimited flat file (CSV) with Windows format. The file will be delivered to Kronos server daily via SFTP. Can a CSV contain malicious code? It first parses and processes the formula which begin with “=” before displaying any content to the user. The formula injected in the CSV might contain call to any system function or it may contain any malicious payload which can exploit the victim’s system. So, the answer is possible. But malicious code that is not executed automatically, it require social engineering to execute the action.

If Kronos Workforce central is installed on top of cloud. And victim workstation contained the shared drive of workforce central server. When malicious code trigger the CSV through social engineering and download the ransomware payload. As a result, it can conducting the action, lock all the files.

So if Kronos hit by ransomware, most likely it is a insider threat. An insider threat is defined as the threat that an employee or a contractor will use his or her authorized access, wittingly or unwittingly, to do harm to the cloud system.

Details of attack: Headline news – Warns Cyberattack May Knock HR Software Offline for Weeks , Kronos hasn’t said whether the attack is related to the Log4Shell vulnerability discovered this past weekend. For more details, please refer to the link https://www.bloomberg.com/news/articles/2021-12-14/kronos-warns-cyberattack-may-knock-hr-software-offline-for-weeks

About CVE-2021-44228 & CVE-2021-4097 (12th Dec 2021)

Preface: We like Java and sometimes we hate it. People think that the php programming language will be eliminated, but there are still many people still using it.

Background: Apache is a pioneer in occupying the Web server platform market. Over time, people worry about the weaknesses of the Apache overall design. So a group of users migrated to NGINX. In fact, Apache still has a small number of loyal fans, the proportion is not small, it include vendor. If people ask you, who is safe? Is NGINX safer than Apache? If a system platform needs to work with other application components to form a service. Therefore, it doesn’t make sense to only focus on whether a single component is designed to be safe.

According to numerous open source reports, Log4j is used with Apache software like Apache Struts, Solr, Druid, along with other technologies. Apache Log4j is a very old logging framework and was the most popular one for several years. It introduced basic concepts, like hierarchical log levels and loggers, that are still used by modern logging frameworks. The development team announced Log4j’s end of life in 2015.

PHP Server Monitor (Phpservermon) is a script that checks whether your websites and servers are up and running. It comes with a web based user interface where you can manage your services and websites, and you can manage users for each server with a mobile number and email address.

Vulnerability details:

CVE-2021-44228 – Apache Log4j2 <=2.14.1 JNDI features used in configuration, log messages, and parameters do not protect against attacker controlled LDAP and other JNDI related endpoints.

Ref: https://nvd.nist.gov/vuln/detail/CVE-2021-44228

CVE-2021-4097 – A vulnerability was found in phpservermon (unknown version) and classified as critical. The phpservermon is vulnerable to Improper Neutralization of CRLF Sequences. CRLF injections are vulnerabilities where the attacker is able to inject CR (carriage return, ASCII 13) and LF (line feed, ASCII 10) characters into the web application. This lets the attacker add extra headers to HTTP responses or even make the browser ignore the original content and process injected content instead.

Ref: https://www.tenable.com/cve/CVE-2021-4097

Fix for CVE-2021-41773 in Apache HTTP Server 2.4.50, it still require fine tune. (9th Dec 2021)

Preface: Some people say that CGI-Bin is a historical site. Today’s onerous security environment, perhaps not people use it. The truth tell us is that CGI-Bin still have space for survival.

Background: About two months ago, the proof of concept for CVE-2021-41773 (Apache 2.4.49 & 2.4.50) vulnerability was released. The remedy solution is modify the configuration of Apache server httpd[.]conf file. As a matter of fact, Apache server has multifunciton, high capability feature. Therefore if software developer and web master do some mistake in this file. It will expand the problem if it has vulnerability occurs.

Vulnerability details (CVE-2021-42013): Found that remedy for CVE-2021-41773 in Apache HTTP Server 2.4.50 was insufficient. An attacker could use a path traversal attack to map URLs to files outside the directories configured by Alias-like directives.

If files outside of these directories are not protected by the usual default configuration “require all denied”, these requests can succeed. If CGI scripts are also enabled for these aliased paths, this could allow for remote code execution.

Reference: In addition to the above-mentioned vulnerabilities, the supplier also discovered new vulnerabilities. For more details, please refer to the link – https://httpd.apache.org/security/vulnerabilities_24.html#2.4.49

aBOUT cve-2021-41014 – Do you think the key element will be given by Java? (8th Dec, 2021)

Preface: Perhaps we still remember a denial of service tool so called slow http attack. It can easily to make a Apache server out of resources less than minute. UTM firewall contains many components. For example, SSL VPN gateway. From technical point of veiw, this module also similar a HTTPS web server. If it contain application filter function, it will be included regular expression function installed.

Background: While analyzing traffic, FortiWeb’s HTTP parser must extract and buffer each part in the request or response. The buffer allows FortiWeb to scan and/or rewrite it before deciding to block or forward the finished traffic.
Buffers are not infinite due to the physical limitations inherent in all RAM, they are allocated a maximum size. If the part of the request or
response is too large to fit the buffer, FortiWeb must either pass or block the traffic without further analysis of that part.

For example, if your web applications require HTTP POST requests with unusually large parameters, you would adjust the HTTP body buffer size. For details, see http-cachesize in the FortiWeb CLI Reference.

Vulnerability details: An uncontrolled resource consumption vulnerability [CWE-400] in FortiWeb may allow an unauthenticated attacker to cause a Denial of Service to the FortiWeb’s HTTP daemon via sending a large amount of crafted HTTP requests.

My observation: If this design weakness given by http handler. Think it over, HTTP handler is a Java component that consists of properties. The handler delivers an outbound integration message as an XML document to a URL by using HTTP or HTTPS protocols. The HTTP handler also evaluates the response code received from the external system. If this is the exact vulnerable component. Maybe one of the possibilities looks like scenario shown on attached diagram.

Official details: Please refer to the link – https://www.fortiguard.com/psirt/FG-IR-21-131

About IOCTL handlers (Buffer Copy without Checking Size of Input (Classic Buffer Overflow)) – 7th Dec 2021

Preface: If it is a integer, just use it directly. If it is a pointer, need to check for valid user address:
int access_ok(int type, const void *addr, unsigned long size);

Background: IOCTL is referred as Input and Output Control, which is used to talk with device drivers. IOCTL is a system call where system call is the programmatic way in which a computer program in user space
requests a service from the kernel space of the operating system.

According to Oracle Solaris 11 Information Library article. So called Well Known ioctl Interfaces. Many ioctl(9E) operations are common to a class of device drivers. For example, most disk drivers implement many of the dkio(7I) family of ioctls. Many of these interfaces copy in or copy out data structures from the kernel, and some of these data structures have changed size in the LP64 data model.

Perhaps the vulnerability this time not related to Oracle 11. Since Oracle is outdated and end-of-life.

Vulnerability details: SentinelLabs has discovered a number of high severity flaws in driver software affecting numerous cloud services. These vulnerabilities originated from a library developed and provided by Eltima, which is in use by several cloud providers. These vulnerabilities affect multiple products. Attacker choose the code deals with a user buffer of type METHOD_NEITHER (Type3InputBuffer), if it IOCTL handler do not have validating. It will trigger the vulnerability of the IOCTL handlers 0x22001B. If you are interested, please refer to the link – https://www.sentinelone.com/labs/usb-over-ethernet-multiple-privilege-escalation-vulnerabilities-in-aws-and-other-major-cloud-services/

Certain versions of WebHMI from Distributed Data systems has vulnerabilities occurs.The manufacturer recommends upgrading to version 4.1. (6th Dec 2021)

Preface: CISA Releases Security Advisory on WebHMI Vulnerabilities – https://us-cert.cisa.gov/ics/advisories/icsa-21-336-03

Background: The company Distributed Data Systems LLC is well-known in Ukraine and abroad for products with WebHMI and 7bit brands for remote monitoring and control of industrial equipment in Industry 4.0 format.

Remark: 7Bit ModBus Proxy is a caching gateway from ModBus TCP protocol to Modbus RTU.

SCADA is a powerful control system that is designed to collect, analyze, and visualize data from industrial equipment. Web-based HMIs allow users to monitor and control devices and processes at a distance. WebHMI is a SCADA-system with built-in web server that allows you to monitor and control any automation system on the local network and via the Internet from your computer and mobile devices.

Vulnerability details: The WebHMI itself encountered two different vulnerabilities includes Authentication Bypass by Primary Weakness and Unrestricted Upload of File with Dangerous Type.

CVE-2021-43931 The authentication algorithm of the WebHMI portal is sound, but the implemented mechanism can be bypassed as the result of a separate weakness that is primary to the authentication error.

CVE-2021-43936 The software allows the attacker to upload or transfer files of dangerous types to the WebHMI portal, that may be automatically processed within the product’s environment or lead to arbitrary code execution.

The following information is our speculation on the cause of the vulnerabilities.

CVE-2021-43931 – Insufficient Session Expiration is a security flaw that lets an application permit an attacker to reuse old session credentials or session IDs, thus exposing an application to attacks that steal or reuse users’ session identifiers.
CVE-2021-43936 – Sneaking in a malicious script is easier than using compiled malware. Once these scripts make their way to the target host, they are executed in a safe location where they cannot be flagged, such as the /tmp folder. Generally, these scripts do not carry out anything malicious on their own, although they do connect to the command-and-control (C&C) server to download malware.

The evasion technique of Ring 3 continues to improve. Since this is the entry point. Therefore Layer 7 with deep packet inspection is the bases for defensive technique. (6th Dec 2021)

Preface: In fact, despite the excel icon, the XLL file is a Dynamic Linked Library, a binary executable file.

Background: The number of data breaches as of September 30, 2021 has exceeded 17% of the total number of incidents in 2020 (1,291 breaches in 2021, and 1,108 breaches in 2020).

The fundamental objective of MS office products goal to increase the office automation efficiency. Before MS product born, type writer, carbon copy and copy machine coverage is fully utilized. When virus appear in early 90s. The evolution of cyber attack from disruption extend to suspend the office operation. Fundamentally, the role of automation software are operations. Perhaps there is no prefect things in our world. From certain view point, cyber criminals exploit the product design weakness is misused. On the other hand design weakness can be group to mis-config. When cyber criminals abuse above two matters. The software is a weapon. Heard some of the domain expert separate I.T and O.T. But MS office also become one of the operation components in their backend operation. What if MS office suddenly become a cyber attack tools. What they can be do?

If the different in between I.T and O.T are safety and longer product life cycle. Apart from safety, the soft ware product life cycle is shorter comparing ten years ago. However hardware is driven by software driver under industrial automation. So it is clear to understand that if O.T product life cycle longer than traditional I.T. Therefore the product end of life and end of support require to focus in this area. Otherwise, when similar of incident occurs, the benefits will give to cyber attacker.

Security Focus: Mshta.exe is a signed Microsoft application that runs Microsoft HTML Applications (HTA) files. These are HTML files that execute JavaScript or VBScript outside of the browser, with the full permission of the executing user.

Furthermore HTA files will run automatically if a user double clicks on them, because of this HTA files are excellent for Phishing, Malvertising, or Waterhole attacks where the user will click on the file and infect themselves. As a matter of fact, lack of security awareness is the potential weakness. If you are interested of HTA attack scenario. Please refer to attached diagram.

But who wants to know a simple way to set up compensation control in your office or industrial area?
If the system infrastructure had integrate to internet, clean DNS service, SIEM and defense including managed security service, local defense (antivirus) will be the defense baseline.
Be my guest, see whether you have time to think it over of this topic.

RAT targeting Nginx. Can we say that NGINX is secure than Apache? (2-12-2021)

Preface: dlopen() The function dlopen() loads the dynamic shared object (shared library) file named by the null-terminated string filename and returns an opaque “handle” for the loaded object.

Background: NGINX Plus provides a supported and tested version.Starting at $2500 per year. NGINX is an open source software. Dynamic modules add functionality to NGINX Plus such as geolocating users by IP address, resizing images and embedding NGINX JavaScript njs or Lua scripts into the NGINX Plus event‑processing model.
Modules are created both by NGINX and third‑party developers.

NGINX, at its core, is a collection of modules. Whether you are using core modules, like the http and stream modules. Or 3rd party module, like geoip or RTMP, they are using the same module framework.
With the addition of dynamic module support, modules are an even better way to add functionality to NGINX.

Details of attack: A new parasitic malware targets the popular Nginx web server, Sansec discovered. This novel code injects itself into a host Nginx application and is nearly invisible. For more details, please refer to the link – https://sansec.io/research/nginrat

Observation: We are also considering a special case in which libraries are loaded during execution by using dlopen() so that external function addresses can be obtained by using dlsym().

Remark: From technical point of view, the return addresses are only used with paired call/ret instructions and are not read or written by other instructions.

However, attackers can also exploit another source of code pointers, return addresses, to perform memory disclosure attacks.