Join Trustwave at the 2023 Gartner Security & Risk Management Summit in London, September 26-28. Learn More

Join Trustwave at the 2023 Gartner Security & Risk Management Summit in London, September 26-28. Learn More

Services
Capture
Managed Detection & Response

Eradicate cyberthreats with world-class intel and expertise

twi-cloud-lock-color-svg
Managed Security Services

Expand your team’s capabilities and strengthen your security posture

twi-briefcase-color-svg
Consulting & Professional Services

Tap into our global team of tenured cybersecurity specialists

twi-dashboard-color-svg
Penetration Testing

Subscription- or project-based testing, delivered by global experts

twi-database-color-svg
Database Security

Get ahead of database risk, protect data and exceed compliance requirements

twi-email-color-svg
Email Security & Management

Catch email threats others miss with layered security & maximum control

twi-managed-portal-color
Co-Managed SOC (SIEM)

Eliminate alert fatigue, focus your SecOps team, stop threats fast, and reduce cyber risk

Solutions
BY TOPIC
Microsoft Exchange Server Attacks
Stay protected against emerging threats
Rapidly Secure New Environments
Security for rapid response situations
Securing the Cloud
Safely navigate and stay protected
Securing the IoT Landscape
Test, monitor and secure network objects
Why Trustwave
The Trustwave Approach
Awards and Accolades
Trustwave SpiderLabs Team
Trustwave Fusion Platform
SpiderLabs Fusion Center
Security Operations Centers
Partners
Technology Alliance Partners
Key alliances who align and support our ecosystem of security offerings
Trustwave PartnerOne Program
Join forces with Trustwave to protect against the most advance cybersecurity threats

[Honeypot Alert] JCE Joomla Extension Attacks

Our web honeypots picked up some increased exploit attempts for an old Joomla Content Editor (JCE) Extension vulnerability.

10321_833a99a7-282a-4842-a4de-3a5054be49d6

Although this vulnerability is a few years old, botnet owners are heavily scanning for sites that are vulnerable and attempting to exploit them.

Exploit Details

Here are the exploit details from the vulnerability write-up on Exploit-DB:

9323_540f92ef-af9f-4bd3-b96a-8c876f45eba0

Web Honeypot Logs - Attack Sequence

Step 1: Attempt to Upload a PHP Webshell

The first step in this attack is to attempt to upload a webshell/backdoor file to the JCE ImageManager. Here is how the attack looked in the default Apache access_log file:

9969_749261ad-7c56-4b30-a121-0827947a922f

This entry shows a POST request to the ImageManager Joomla Plugin using the "com_jce" option. We can also see a tell-tale sign of a malicious program in the User-Agent string value "BOT for JCE". Unfortunately, the default Apache access_log does not actually log the critical POST payload for this request so we can not see what was sent. Fortunately, we also have our ModSecurity WAF installed so we can go to the detailed audit log file to see the complete transaction. Here is the same transaction as logged by ModSecurity:

12456_ea8ba8f9-4a50-4603-a2ec-817e4fcee2d1

We notice a few things here:

  • Under Section "B" - We can see the POST request is "MultiPart" meaning that it is an attempt to upload a file attachment.
  • Under Section "J" - we can see the meta-data about the file attachment. It was a file called "food.gif".
  • Under Section "H" - we see two different rules triggered on this request. One for a missing Accept request header and one from our commercial ModSecurity rules package for the suspicious User-Agent value.

File Attachment Analysis

ModSecurity has the ability to capture and store file attachments. When we inspect the "food.gif" file, we find the following:

9914_7213f40a-5b0f-4546-8a12-4fa722244a09

This is an obfuscated PHP file. After decoding, we find this section of code:

11699_c61cf2b6-2906-4754-8239-bde4036139a1

This is a typical webshell/backdoor that allows the attacker to submit OS commands and upload files:

11253_b07f6771-1782-4b52-80d6-fe7274ea923c

Step 2: Rename File Extension

After uploading the webshell file, the attacker next needs to rename the file and change the file extension from ".gif" to ".php" so that it will be executed as code by the application. There are known exploit tools to achieve this task. Here is an example screenshot of a PHP exploit page:

11574_bfbac2d2-9b57-46c7-ab2c-f7f074c065e2

The source code of the page shows the attack details:

11141_aabf767f-5755-43d9-8cdb-db5979232d12

The highlighted section show the JSON request body content that uses the "folderRename" action to change the uploaded file extension. This is how the actual attack attempt looked in the ModSecurity audit log file:

12126_dae6cb80-ca36-4059-bf22-b1c7503c9112

Note under Section H that our commercial rule captured this attack attempt.

Step 3: Access the Webshell

The last step in the attack sequence was for the attacker to try and access the webshell file:

9010_45f050e2-d987-43b4-ac69-108b686ca2f9
Since the exploit attempt did not work, the honeypot returned a 404.

Conclusion

Attackers are constantly scanning the internet for web sites that have out-dated software. It is critical that web site owners stay vigilant in updating their software and applying patches. In addition, using a Web Application Firewall (WAF) such as ModSecurity can also aid operational security personnel with incident response by providing essential transactional data.