xbdms' Blog

Learn about privacy, security, and anonymity with the help of these articles.

December 21, 2021

In this blog, I will discuss about the log4j, and logback bugs of what we know so far, And why you must ditch 2.15.

Everyone's heard of the critical log4j zero-day by now. Dubbed 'Log4Shell,' the vulnerability has already set the internet on fire.

Thus far, the log4j vulnerability, tracked as CVE-2021-44228, has been abused by all kinds of threat actors from state-backed hackers to ransomware gangs and others to inject Monero miners on vulnerable systems.

Log4j usage is rampant among many software products and multiple vendor advisories have since surfaced. And, it now seems, 'logback' isn't all that immune either.

Below we summarize the multiple relevant CVEs identified thus far, and pretty good reasons to ditch log4j version 2.15.0, in favor of 2.16.0.

Update Dec 18th, 05:33 AM ET: New 2.17.0 version is out now replacing 2.16.0 that has been found to be vulnerable to CVE-2021-45105, a DoS flaw. The article below has been updated to include this new CVE along with an additional report released by BleepingComputer today.

What all CVEs should I be concerned about?

It all began last Thursday, December 9th, when a PoC exploit for the critical Log4j zero-day hit GitHub.

What followed was the vulnerability disclosure and mass-scanning activity from attackers targeting vulnerable servers.

Given Log4j's vast usage in the majority of Java applications, Log4Shell soon turned into a nightmare for enterprises and governments worldwide.

Below are the CVEs in the order that they emerged that you should know about:

  • CVE-2021-44228 [Critical]: The original 'Log4Shell' vulnerability is an untrusted deserialization flaw. Rated critical in severity, this one scores a 10 on the CVSS scale and grants remote code execution (RCE) abilities to unauthenticated attackers, allowing complete system takeover.

Reported by Chen Zhaojun of Alibaba Cloud Security Team to Apache on November 24th, CVE-2021-44228 impacts the default configurations of multiple Apache frameworks, including Apache Struts2, Apache Solr, Apache Druid, Apache Flink, and others.

Being the most dangerous of them all, this vulnerability lurks in the log4j-core component, limited to 2.x versions: from 2.0-beta9 up to and including 2.14.1. A fix for Log4Shell was rolled out in version 2.15.0 but deemed incomplete (keep reading).

Threat intel analyst Florian Roth shared Sigma rules [12] that can be employed as one of the defenses.   * CVE-2021-45046 [Critical, previously Low]: This one is a Denial of Service (DoS) flaw scoring a 3.7 9.0. The flaw arose as a result of an incomplete fix that went into 2.15.0 for CVE-2021-44228. While the fix applied to 2.15.0 did largely resolve the flaw, that wasn't quite the case for certain non-default configurations.

Log4j 2.15.0 makes “a best-effort attempt” to restrict JNDI LDAP lookups to localhost by default. But, attackers who have control over the Thread Context Map (MDC) input data can craft malicious payloads via the JNDI Lookup patterns to cause DoS attacsk. This applies to non-default configurations in which a non-default Pattern Layout using either a Context Lookup, e.g. $${ctx:loginId}, or a Thread Context Map pattern (%X, %mdc, or %MDC).

“Log4j 2.16.0 fixes this issue by removing support for message lookup patterns and disabling JNDI functionality by default,” states the NVD advisory. For those on 2.12.1 branch, a fix was backported into 2.12.2.   * CVE-2021-4104 [High]: Did we say Log4j 2.x versions were vulnerable? What about Log4j 1.x?

While previously thought to be safe, Log4Shell found a way to lurk in the older Log4j too. Essentially, non-default configuration of Log4j 1.x instances using the JMSAppender class also become susceptible to the untrusted deserialization flaw.

Although a less severe variant of CVE-2021-44228, nonetheless, this CVE impacts all versions of the log4j:log4j and org.apache.log4j:log4j components for which only 1.x releases exist. Because these are end-of-life versions, a fix for 1.x branch does not exist anywhere, and one should upgrade to log4j-core 2.16.0.   * CVE-2021-42550 [Moderate]: This is a vulnerability in the Logback logging framework. A successor to the Log4j 1.x library, Logback claims to pick up “where log4j 1.x leaves off.”

Up until last week, Logback also bragged that being “unrelated to log4j 2.x, [logback] does not share its vulnerabilities.”

That assumption quickly faded when CVE-2021-4104 was discovered to impact Log4j 1.x as well, and the possibility of potential impact to Logback was assessed. Newer Logback versions, 1.3.0-alpha11 and 1.2.9 addressing this less severe vulnerability have now been released.   * CVE-2021-45105 [High]: Log4j 2.16.0 was found out to be vulnerable to a DoS flaw rated 'High' in severity. Apache has since released a log4j 2.17.0 version fixing the CVE. More details on this development are provided in BleepingComputer's latest report.   * One more CVE...? Keep reading.

Ditch Log4j 2.15: DNS exfiltration & RCE possible

Log4j 2.15.0 might contain even more severe vulnerabilities than the ones discovered so far, which is why 2.16.0 is by far a safer bet.

Because of CVE-2021-45046 described above, the maximum impact from the flaw initially appeared to be DoS, but that assumption is evolving, BleepingComputer has learned.

Cloud security firm Praetorian demonstrated how Log4j 2.15.0 versions could still be abused for DNS-based data exfiltration from external hosts, and is working with Apache towards a coordinated disclosure.

In an email interview with BleepingComputer, Praetorian's principal security engineer, Anthony Weems sheds more light on the research:

“The Praetorian blog post is in response to CVE-2021-45046, which applies to Log4j version 2.15. The CVE description states that—when using a specific type of Pattern Layout—this vulnerability can lead to a denial of service. The reason they state it is DoS only is due to the localhost allowlist,“ Weems tells BleepingComputer.

“We've developed a bypass for this 'localhost' allowlist and sent the details to Apache. At minimum, this means systems that are vulnerable to CVE-2021-45046 are not just vulnerable to DoS, but also DNS exfil of potentially sensitive environment variables.”

Praetorian shared a PoC video demonstrating just this:

https://www.youtube.com/watch?v=bxDEJDqANig

“Apache has confirmed receipt of the write-up; whether this merits an edit of the CVE or a new CVE is a good question – however, the action required by defenders is clear cut in either case: moving to 2.16.0 where jndi is disabled by default is the safest course of action, and is the approach we're recommending for our customers,” concluded Praetorian in their statement to BleepingComputer.

Moreover, at the time of writing, BleepingComputer came across multiple security researchers claiming that it is possible to achieve full-on RCE, even with 2.15.0.

“Here is a PoC in how to bypass allowedLdapHost and allowedClasses checks in Log4J 2.15.0. to achieve RCE... and to bypass allowedClasses just choose a name for a class in the JDK. Deserialization will occur as usual,” explains researcher Márcio Almeida:

This happens because how the check was done. the https://t.co/KrgP5x639Q.URI getHost() method returns the value before the # as the real host. But the JNDI/LDAP resolver will resolve to the full hostname string attempting to connect to the malicious LDAP server. 2/n pic.twitter.com/HuZtYekuHw

— Márcio Almeida (@marcioalm) [December 17, 2021](https://twitter.com/marcioalm/status/1471742744347348997?refsrc=twsrc%5Etfw)_

Similarly, Alvaro Muñoz of GitHub Security Lab shared success with bypassing the fixes made to 2.15.0 to achieve remote code execution:

[@atorralba](https://twitter.com/_atorralba?ref_src=twsrc%5Etfw) and I just managed to bypass the allowedLdapHost and allowedClasses checks. 2.15 with no formatMsgNoLookups mitigations is still vulnerable to RCE. 2.15.0 w/o those mitigations is vulnerable only if attackers can control non-message parts of the pattern layout_

— Alvaro Muñoz (@pwntester) [December 16, 2021](https://twitter.com/pwntester/status/1471465662975561734?refsrc=twsrc%5Etfw)_

“As a side note, the default settings will not be affected. Lookup must be enabled by specifying %m{lookups} or by a method such as CVE-2021-45046,“ says security researcher RyotaK, adding to Muñoz's research.

The worst possible scenario resulting from Log4j 2.15.0 is yet to be fully determined, but suffice to say, it doesn't seem like it's just limited to DoS.

As the situation continues to evolve, organizations and developers are encouraged to upgrade to version 2.16.0, and to continue to monitor Apache's Log4j advisory page for updates.

Update 09:11 AM ET: Severity for CVE-2021-45046 changed to Critical/9.0 according to Apache's updated advisory page.

Sources:

Researchers release 'vaccine' for critical Log4Shell vulnerability

New zero-day exploit for Log4j Java library is an enterprise nightmare

Upgraded to log4j 2.16? Surprise, there's a 2.17 fixing DoS

Log4j: List of vulnerable products and vendor advisories

Hackers start pushing malware in worldwide Log4Shell attacks

December 21, 2021

In this blog, I will let you know news about the iOS 15.3 leak via the Apple Developer website.

Sources:

https://9to5mac.com/2021/12/17/ios-15-3-mysteriously-leaked-via-apple-developer-website-heres-what-happened/

December 21, 2021

December 21, 2021

In this blog, I will show you how to setup the new communication safety feature for your kids in iOS 15.2.

https://www.youtube.com/watch?v=7dyZcVQe0P0

Sources:

https://9to5mac.com/2021/12/17/turn-on-kids-iphone-messages-safety-feature/

December 21, 2021

In this blog, I will show you how to fast check, If your server could be vulnerable to CVE-2021-44228 (the log4j vulnerability). It does not give a 100% proof, that you are not vulnerable, but it gives a hint if it is possible, that you could be vulnerable.

Download the log4j scanner: https://github.com/rubo77/log4j_checker_beta

Errors:

Be aware, It could give false positives like those of ElasticSearch.

See: https://www.elastic.co/guide/en/elasticsearch/reference/current/release-notes-7.16.1.html

Security Updates: A high severity vulnerability (CVE-2021-44228) for Apache Log4j 2 versions 2.0 to 2.14 was disclosed publicly on the project’s GitHub on December 9, 2021.

Here is my example of one my servers:

December 22, 2021

In this blog, I will show you how to get someone’s backend ip address hiding behind cloudflare. With also showing how to protect your backend ip from bad actors. A lot of people make mistakes of not correctly securing your backend ip from bad actors, Even though there’s nothing wrong about leaking someone’s backend ip, It’s just their server ip address. Depending if they got good ddos protection on it. It doesn’t really matter if it leaked. Unless your server has weak security measures, Then the backend ip is useful. I am going to show you two websites that i use for educational purposes only, And revise not to use this for any illegal use.

  1. Go to Shodan or Censys, And enter a domain name that you are interested in.

  2. Once you entered the domain name of the requested information you wanted to see, You should get information containing, IP Addresses, SSL Certs, SSL Versions (TLS).

Sources:

https://support.cloudflare.com/hc/en-us/articles/201897700-Allowing-Cloudflare-IP-addresses

https://support.cloudflare.com/hc/en-us/articles/200170166-Best-Practices-DDoS-preventative-measures

December 22, 2021

In this blog, I will show you how to protect your website using cloudflare free plan only. This is for people that don’t want to spend much money on ddos protection in 2021. As you shouldn’t, As the world is starting to get better at technology, We will not be paying as much for ddos protection to protect our websites from ddos attacks. This will protect your website 100% and thousands or even millions of also used this method.

Fork or star the github repo:

https://github.com/xbdmdev/Cloudflare-Firewall

December 23, 2021

In this blog, You will need to see if your ISP has secured you with RPKI correctly to sign cryptography traffic over your network. This will check if your insecured or secured from BGP hijacking.

Why is BGP unsafe?:

By default, BGP does not embed any security protocols. It is up to every autonomous system to implement filtering of “wrong routes”. Leaking routes can break parts of the Internet by making them unreachable. It is commonly the result of misconfigurations. Although, it is not always accidental. A practice called BGP hijack consists of redirecting traffic to another autonomous system to steal information (via phishing, or passive listening for instance).

BGP can be made safe if all autonomous systems (AS) only announce legitimate routes. A route is defined as legitimate when the owner of the resource allows its announcement. Filters need to be built in order to make sure only legitimate routes are accepted. There are a few approaches for BGP route validation which vary in degrees of trustability and efficiency. A mature implementation is RPKI.

What is RPKI?:

With 800k+ routes on the Internet, it is impossible to check them manually. Resource Public Key Infrastructure (RPKI) is a security framework method that associates a route with an autonomous system. It uses cryptography in order to validate the information before being passed onto the routers. You can read more about RPKI on the Cloudflare blog.

On May 14th, Job Snijders from NTT will present a free RPKI 101 webinar.

How does the test work?:

In order to test if your ISP is implementing BGP safely, Cloudflare announce a legitimate route, but they make sure the announcement is invalid. If you can load the website that they host on that route, that means the invalid route was accepted by your ISP. A leaked or a hijacked route would likely be accepted too.

Test of My ISP:

Sources:

https://blog.cloudflare.com/is-bgp-safe-yet-rpki-routing-security-initiative/

New Write.as & Write.freely Dark Theme

In this blog, I have created a way better easy on the eyes dark theme. This is open-sourced obviously so if you do not like anything, You can edit it.

Download theme:

https://codeberg.org/xbdm/Write.as-Write.freely-Dark-Theme

December 24, 2021

In this blog, I show you Firewalls, Encryption, Anti-Virus, & Hosts files to help you ensure your Solus OS is a lot more secure than an unprotected one.

Solus is a curated rolling release with a goal that no updates should break anything to new users. So most users are running very up to date and not holding back in fear that they would need to fix something that an update broke.

Solus uses quite new mainline kernels, usually about 3rd point release and then updates them often, only after most bugs of a new major release are ironed out.

CVEs are patched very quickly and are pushed into the stable repos as quickly as possible and out of schedule. Usually stable is synced with unstable on fridays, with only exceptions if there is a major bug or there is an ongoing stack update.

There are as little out of tree patches as possible both in kernel and all packages, and that policy is very strict.

The package build process is very transparent, from pspecx8664.xml you can clearly see what files changed from with a package update and that allows the core team to quickly verify that nothing got screwed up. Here is phabricator: https://dev.getsol.us

  1. When you first get solus and installing on your SSD, Make sure to setup full disk encryption to make your disk drive have encrypted scrambles from hackers or surveillances. (Bonus: Once you finished installing the os on your ssd, Full disk encrypt your other drives to be safe.)

  2. Install firewall in the package manager by searching “ufw” and install both packages: Once you have installed both packages, you can either go in the terminal or use the gui to enable the ufw. (Bonus: If you want to be a chad, You can install it with the terminal like so: sudo eopkg install ufw, Then do sudo ufw enable + sudo ufw status to check if it’s enabled.)

  3. Install a Anti-virus for protecting other users: Solus OS do not need a anti-virus, But if needed if your paranoid and want to protect users that do not use solus os or any linux distro. If the users only use windows / mac instead. So the best linux alternative for a anti-virus is clamav or sophos. I will not help you install it as i do not use one just use your brain.

  4. Configuring your host file to block threats and give extra layer security: First thing to do is go into your terminal, Type this command in your terminal, “sudo nano /etc/hosts”. Once you have done that now you can use the arrow keys and scroll down to the bottom where you need to copy and paste these recommended host file settings here at these links:

https://someonewhocares.org/hosts/

Sources:

https://www.reddit.com/r/SolusProject/comments/ih4614/security_of_solus_the_operating_system/

https://discuss.getsol.us/d/1038-question-security-of-solus-os/5

https://discuss.getsol.us/d/6918-about-privacy-and-security

https://www.bleepingcomputer.com/forums/t/656210/security-of-ubuntu-its-flavors-and-solus-os/

https://medium.com/geekculture/solus-budgie-e461f7b90b40

https://frameboxxindore.com/apple/best-answer-is-solus-linux-good.html